]> git.pld-linux.org Git - SPECS.git/blob - python-ZODB.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / python-ZODB.spec
1 # TODO:
2 # - fix tests
3 # - fix docs
4 # Conditional build:
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
9
10 # NOTES:
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
14 %define         module          ZODB
15 %define         egg_name        ZODB
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}
20 Version:        5.3.0
21 Release:        5
22 License:        ZPL 2.1
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
29 %if %{with python2}
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
38 %endif
39 %if %{with python3}
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
48 %endif
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
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 Implementation of the JSON-RPC v2.0 specification
64 (backwards-compatible) as a client library.
65
66 # %%description -l pl.UTF-8
67
68 %package -n python3-%{pypi_name}
69 Summary:        -
70 Summary(pl.UTF-8):      -
71 %description -n python3-%{pypi_name}
72
73 %description -n python3-%{pypi_name} -l pl.UTF-8
74
75 %package apidocs
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}
86 Group:          Documentation
87
88 %description apidocs
89 API documentation for Pythona %{module} module.
90
91 %description apidocs -l pl.UTF-8
92 Dokumentacja API modułu Pythona %{module}.
93
94 %prep
95 %setup -q -n %{pypi_name}-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build %{?with_tests:test}
100 %endif
101
102 %if %{with python3}
103 %py3_build %{?with_tests:test}
104 %endif
105
106 %if %{with doc}
107 cd docs
108 %{__make} -j1 html
109 rm -rf _build/html/_sources
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %py_install
117
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}
123
124 %py_postclean
125 %endif
126
127 %if %{with python3}
128 %py3_install
129 %endif
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %files
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
140 %endif
141
142 %if %{with python3}
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
149 %endif
150
151 %if %{with doc}
152 %files apidocs
153 %defattr(644,root,root,755)
154 %doc docs/_build/html/*
155 %endif
This page took 0.129004 seconds and 3 git commands to generate.