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