2 # - check test failures: FAIL: test_ring_impl (persistent.tests.test_picklecache.PickleCacheTests)
3 # - fix docs: Could not import extension repoze.sphinx.autointerface (exception: No module named 'repoze')
4 # - delete/packages /usr/lib64/python*/site-packages/persistent/tests/
6 %bcond_with doc # don't build doc
7 %bcond_with tests # do not perform "make test"
8 %bcond_without python2 # CPython 2.x module
9 %bcond_without python3 # CPython 3.x module
11 %define module persistent
12 %define pypi_name %{module}
14 Summary: Automatic persistence for Python objects
15 Summary(pl.UTF-8): Automytczne trwałe obiekty w Pythonie
16 Name: python-%{module}
20 Group: Libraries/Python
21 #Source0Download: https://pypi.org/simple/persistent/
22 Source0: https://files.pythonhosted.org/packages/source/p/persistent/%{pypi_name}-%{version}.tar.gz
23 # Source0-md5: ce8886ff707814571299935fe84a4bc9
24 URL: http://www.zope.org/Products/ZODB
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
28 BuildRequires: python-devel
29 BuildRequires: python-setuptools
32 BuildRequires: python3-devel
33 BuildRequires: python3-setuptools
35 Requires: python-modules
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %description -l pl.UTF-8
42 %package -n python3-%{module}
43 Summary: Automatic persistence for Python objects
44 Summary(pl.UTF-8): Automytczne trwałe obiekty w Pythonie
45 Group: Libraries/Python
46 Requires: python3-modules
48 %description -n python3-%{module}
50 %description -n python3-%{module} -l pl.UTF-8
53 Summary: %{module} API documentation
54 Summary(pl.UTF-8): Dokumentacja API %{module}
58 API documentation for %{module}.
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API %{module}.
64 %setup -q -n %{module}-%{version}
68 %py_build %{?with_tests:test}
72 %py3_build %{?with_tests:test}
78 rm -rf _build/html/_sources
82 rm -rf $RPM_BUILD_ROOT
93 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc README.rst CHANGES.rst
99 %dir %{py_sitedir}/%{module}
100 %{py_sitedir}/%{module}/*.py[co]
101 %{py_sitedir}/%{module}/*.[ch]
102 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
103 %{py_sitedir}/%{module}-%{version}-py*.egg-info
104 %dir %{py_incdir}/persistent/
105 %{py_incdir}/persistent/cPersistence.h
106 %{py_incdir}/persistent/ring.h
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README.rst CHANGES.rst
113 %dir %{py3_sitedir}/%{module}
114 %{py3_sitedir}/%{module}/*.py
115 %{py3_sitedir}/%{module}/*.[ch]
116 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
117 %{py3_sitedir}/%{module}/__pycache__
118 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
119 %dir %{py3_incdir}/persistent/
120 %{py3_incdir}/persistent/cPersistence.h
121 %{py3_incdir}/persistent/ring.h
126 %defattr(644,root,root,755)
127 %doc docs/_build/html/*