5 %bcond_with doc # don't build doc
6 %bcond_with tests # do not perform "make test"
7 %bcond_without python2 # CPython 2.x module
8 %bcond_without python3 # CPython 3.x module
11 # - 'module' should match the Python import path (first component?)
12 # - 'egg_name' should equal to Python egg name
13 # - 'pypi_name' must match the Python Package Index name
16 %define pypi_name ZODB
17 Summary: Python object-oriented database
18 Summary(pl.UTF-8): Pythonowa zorientowana obietowo baza danych
19 Name: python-%{pypi_name}
23 Group: Libraries/Python
24 Source0: https://files.pythonhosted.org/packages/source/Z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
25 # Source0-md5: 606b51a7a027d5bba2ed4269f3187c67
26 URL: http://www.zodb.org/
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.714
30 BuildRequires: python-BTrees
31 BuildRequires: python-ZConfig
32 BuildRequires: python-modules
33 BuildRequires: python-persistent
34 BuildRequires: python-setuptools
35 BuildRequires: python-transaction
36 BuildRequires: python-zc.lockfile
37 BuildRequires: python-zodbpickle
40 BuildRequires: python3-BTrees
41 BuildRequires: python3-ZConfig
42 BuildRequires: python3-modules
43 BuildRequires: python3-persistent
44 BuildRequires: python3-setuptools
45 BuildRequires: python3-transaction
46 BuildRequires: python3-zc.lockfile
47 BuildRequires: python3-zodbpickle
49 # when using /usr/bin/env or other in-place substitutions
50 #BuildRequires: sed >= 4.0
51 # replace with other requires if defined in setup.py
52 Requires: python-BTrees
53 Requires: python-ZConfig
54 Requires: python-modules
55 Requires: python-persistent
56 Requires: python-transaction
57 Requires: python-zc.lockfile
58 Requires: python-zodbpickle
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Implementation of the JSON-RPC v2.0 specification
64 (backwards-compatible) as a client library.
66 # %%description -l pl.UTF-8
68 %package -n python3-%{pypi_name}
71 %description -n python3-%{pypi_name}
73 %description -n python3-%{pypi_name} -l pl.UTF-8
76 Summary: API documentation for Python %{module} module
77 Group: Libraries/Python
78 Requires: python3-BTrees
79 Requires: python3-ZConfig
80 Requires: python3-modules
81 Requires: python3-persistent
82 Requires: python3-transaction
83 Requires: python3-zc.lockfile
84 Requires: python3-zodbpickle
85 Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
89 API documentation for Pythona %{module} module.
91 %description apidocs -l pl.UTF-8
92 Dokumentacja API modułu Pythona %{module}.
95 %setup -q -n %{pypi_name}-%{version}
99 %py_build %{?with_tests:test}
103 %py3_build %{?with_tests:test}
109 rm -rf _build/html/_sources
113 rm -rf $RPM_BUILD_ROOT
118 # when files are installed in other way that standard 'setup.py
119 # they need to be (re-)compiled
120 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
121 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
122 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc CHANGES.rst DEVELOPERS.rst HISTORY.rst
138 %{py_sitescriptdir}/%{module}
139 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
143 %files -n python3-%{pypi_name}
144 %defattr(644,root,root,755)
145 %doc CHANGES.rst DEVELOPERS.rst HISTORY.rst
146 %attr(755,root,root) %{_bindir}/*
147 %{py3_sitescriptdir}/%{module}
148 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
153 %defattr(644,root,root,755)
154 %doc docs/_build/html/*