]>
Commit | Line | Data |
---|---|---|
365e6511 JK |
1 | # |
2 | # Conditional build: | |
5a836b5c JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
365e6511 JK |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
3805cb6f | 8 | %define module billiard |
365e6511 | 9 | Summary: Multiprocessing Pool Extensions |
5a836b5c | 10 | Summary(pl.UTF-8): Rozszerzenia puli procesów |
365e6511 | 11 | Name: python-%{module} |
9ed702ab | 12 | # keep 3.x here for python2 support |
3805cb6f | 13 | Version: 3.6.4.0 |
348eb536 | 14 | Release: 6 |
365e6511 JK |
15 | License: BSD |
16 | Group: Libraries/Python | |
5a836b5c JB |
17 | #Source0Download: https://pypi.org/simple/billiard/ |
18 | Source0: https://files.pythonhosted.org/packages/source/b/billiard/%{module}-%{version}.tar.gz | |
3805cb6f | 19 | # Source0-md5: b49503b8a78743dcb6a86accea379357 |
365e6511 JK |
20 | URL: https://github.com/celery/billiard |
21 | BuildRequires: rpm-pythonprov | |
5a836b5c | 22 | BuildRequires: rpmbuild(macros) >= 1.752 |
365e6511 | 23 | %if %{with python2} |
0c138dae | 24 | BuildRequires: python-devel >= 1:2.7 |
0f59a356 | 25 | BuildRequires: python-setuptools >= 1:40.0.0 |
365e6511 | 26 | %if %{with tests} |
5a836b5c | 27 | BuildRequires: python-case >= 1.3.1 |
9ed702ab | 28 | BuildRequires: python-psutil >= 5.8.0 |
5a836b5c | 29 | BuildRequires: python-pytest |
365e6511 JK |
30 | %endif |
31 | %if %{with doc} | |
9ed702ab | 32 | BuildRequires: sphinx-pdg-2 |
365e6511 JK |
33 | %endif |
34 | %endif | |
35 | %if %{with python3} | |
5a836b5c | 36 | BuildRequires: python3-devel >= 1:3.5 |
0f59a356 | 37 | BuildRequires: python3-setuptools >= 1:40.0.0 |
365e6511 | 38 | %if %{with tests} |
5a836b5c | 39 | BuildRequires: python3-case >= 1.3.1 |
9ed702ab | 40 | BuildRequires: python3-psutil >= 5.8.0 |
5a836b5c | 41 | BuildRequires: python3-pytest |
365e6511 JK |
42 | %endif |
43 | %endif | |
5a836b5c | 44 | Requires: python-modules >= 1:2.7 |
365e6511 JK |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | %description | |
48 | billiard is a fork of the Python 2.7 multiprocessing package. The | |
49 | multiprocessing package itself is a renamed and updated version of R | |
5a836b5c JB |
50 | Oudkerk's pyprocessing package. This standalone variant draws its |
51 | fixes/improvements from python-trunk and provides additional bug fixes | |
52 | and improvements. | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | billiard to odgałęzienie pakietu multiprocessing z Pythona 2.7. Pakiet | |
56 | multiprocessing to uaktualniona wersja pakietu pyprocessing R Oudkerka | |
57 | ze zmienioną nazwą. Samodzielny wariant czerpie poprawki i | |
58 | usprawnienia z najświeższego Pythona, ponadto zawiera dodatkowe | |
59 | poprawki błędów i ulepszenia. | |
365e6511 JK |
60 | |
61 | %package -n python3-%{module} | |
62 | Summary: Multiprocessing Pool Extensions | |
5a836b5c | 63 | Summary(pl.UTF-8): Rozszerzenia puli procesów |
365e6511 | 64 | Group: Libraries/Python |
5a836b5c | 65 | Requires: python3-modules >= 1:3.5 |
cd4df658 | 66 | BuildArch: noarch |
365e6511 JK |
67 | |
68 | %description -n python3-%{module} | |
69 | billiard is a fork of the Python 2.7 multiprocessing package. The | |
70 | multiprocessing package itself is a renamed and updated version of R | |
5a836b5c JB |
71 | Oudkerk's pyprocessing package. This standalone variant draws its |
72 | fixes/improvements from python-trunk and provides additional bug fixes | |
73 | and improvements. | |
74 | ||
75 | %description -n python3-%{module} -l pl.UTF-8 | |
76 | billiard to odgałęzienie pakietu multiprocessing z Pythona 2.7. Pakiet | |
77 | multiprocessing to uaktualniona wersja pakietu pyprocessing R Oudkerka | |
78 | ze zmienioną nazwą. Samodzielny wariant czerpie poprawki i | |
79 | usprawnienia z najświeższego Pythona, ponadto zawiera dodatkowe | |
80 | poprawki błędów i ulepszenia. | |
365e6511 JK |
81 | |
82 | %package apidocs | |
5a836b5c JB |
83 | Summary: API documentation for billiard module |
84 | Summary(pl.UTF-8): Dokumentacja API modułu billiard | |
365e6511 | 85 | Group: Documentation |
cd4df658 | 86 | BuildArch: noarch |
365e6511 JK |
87 | |
88 | %description apidocs | |
5a836b5c | 89 | API documentation for billiard module. |
365e6511 JK |
90 | |
91 | %description apidocs -l pl.UTF-8 | |
5a836b5c | 92 | Dokumentacja API modułu billiard. |
365e6511 JK |
93 | |
94 | %prep | |
95 | %setup -q -n %{module}-%{version} | |
365e6511 JK |
96 | |
97 | %build | |
98 | %if %{with python2} | |
5a836b5c | 99 | %py_build |
365e6511 | 100 | |
5a836b5c JB |
101 | %if %{with tests} |
102 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
103 | %{__python} -m pytest t/unit | |
365e6511 JK |
104 | %endif |
105 | %endif | |
106 | ||
107 | %if %{with python3} | |
5a836b5c JB |
108 | %py3_build |
109 | ||
110 | %if %{with tests} | |
111 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
112 | %{__python3} -m pytest t/unit | |
113 | %endif | |
114 | %endif | |
115 | ||
116 | %if %{with doc} | |
117 | cd Doc | |
9ed702ab JB |
118 | PYTHONPATH=$(pwd)/../build-2/lib \ |
119 | sphinx-build-2 -b html -d .build/doctrees . .build/html | |
5a836b5c | 120 | cd .. |
365e6511 JK |
121 | %endif |
122 | ||
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %if %{with python2} | |
747a9fbf | 127 | %py_install |
365e6511 JK |
128 | |
129 | %py_postclean | |
130 | %endif | |
131 | ||
132 | %if %{with python3} | |
747a9fbf | 133 | %py3_install |
365e6511 JK |
134 | %endif |
135 | ||
136 | %clean | |
137 | rm -rf $RPM_BUILD_ROOT | |
138 | ||
139 | %if %{with python2} | |
140 | %files | |
141 | %defattr(644,root,root,755) | |
5a836b5c | 142 | %doc CHANGES.txt LICENSE.txt README.rst |
365e6511 JK |
143 | %dir %{py_sitedir}/%{module} |
144 | %{py_sitedir}/%{module}/*.py[co] | |
145 | %dir %{py_sitedir}/%{module}/dummy | |
146 | %{py_sitedir}/%{module}/dummy/*.py[co] | |
5a836b5c | 147 | %attr(755,root,root) %{py_sitedir}/_billiard.so |
365e6511 JK |
148 | %{py_sitedir}/%{module}-%{version}-py*.egg-info |
149 | %endif | |
150 | ||
151 | %if %{with python3} | |
152 | %files -n python3-%{module} | |
153 | %defattr(644,root,root,755) | |
5a836b5c | 154 | %doc CHANGES.txt LICENSE.txt README.rst |
365e6511 JK |
155 | %{py3_sitescriptdir}/%{module} |
156 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
157 | %endif | |
158 | ||
159 | %if %{with doc} | |
160 | %files apidocs | |
161 | %defattr(644,root,root,755) | |
5a836b5c | 162 | %doc Doc/.build/html/{_static,library,*.html,*.js} |
365e6511 | 163 | %endif |