]>
Commit | Line | Data |
---|---|---|
365e6511 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
9f3d2443 | 4 | %bcond_with tests # do perform "make test" (downloads external code) |
365e6511 JK |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module billiard | |
9 | Summary: Multiprocessing Pool Extensions | |
10 | Name: python-%{module} | |
c13aee0d AM |
11 | Version: 3.6.2.0 |
12 | Release: 1 | |
365e6511 JK |
13 | License: BSD |
14 | Group: Libraries/Python | |
c13aee0d AM |
15 | # Source0: https://pypi.python.org/packages/source/b/billiard/%{module}-%{version}.tar.gz |
16 | Source0: https://pypi.debian.net/%{module}/%{module}-%{version}.tar.gz | |
17 | # Source0-md5: 04f6ad67ed874ec12395e9750601e509 | |
365e6511 JK |
18 | URL: https://github.com/celery/billiard |
19 | BuildRequires: rpm-pythonprov | |
eabe6531 | 20 | BuildRequires: rpmbuild(macros) >= 1.710 |
365e6511 | 21 | %if %{with python2} |
0c138dae | 22 | BuildRequires: python-devel >= 1:2.7 |
365e6511 JK |
23 | BuildRequires: python-setuptools |
24 | %if %{with tests} | |
25 | BuildRequires: python-mock | |
26 | BuildRequires: python-nose | |
27 | %endif | |
28 | %if %{with doc} | |
29 | BuildRequires: sphinx-pdg | |
30 | %endif | |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-devel | |
34 | BuildRequires: python3-setuptools | |
35 | %if %{with tests} | |
36 | BuildRequires: python3-nose | |
37 | %endif | |
38 | %endif | |
39 | Requires: python-modules | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %description | |
43 | billiard is a fork of the Python 2.7 multiprocessing package. The | |
44 | multiprocessing package itself is a renamed and updated version of R | |
45 | Oudkerk's pyprocessing package. This standalone variant is intended to | |
46 | be compatible with Python 2.4 and 2.5, and will draw its | |
47 | fixes/improvements from python-trunk. | |
48 | ||
49 | %package -n python3-%{module} | |
50 | Summary: Multiprocessing Pool Extensions | |
51 | Group: Libraries/Python | |
52 | Requires: python3-modules | |
53 | BuildArch: noarch | |
54 | ||
55 | %description -n python3-%{module} | |
56 | billiard is a fork of the Python 2.7 multiprocessing package. The | |
57 | multiprocessing package itself is a renamed and updated version of R | |
58 | Oudkerk's pyprocessing package. This standalone variant is intended to | |
59 | be compatible with Python 2.4 and 2.5, and will draw its | |
60 | fixes/improvements from python-trunk. | |
61 | ||
62 | %package apidocs | |
63 | Summary: %{module} API documentation | |
64 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
65 | Group: Documentation | |
af8f28b4 ER |
66 | %if "%{_rpmversion}" >= "5" |
67 | BuildArch: noarch | |
68 | %endif | |
365e6511 JK |
69 | |
70 | %description apidocs | |
71 | API documentation for %{module}. | |
72 | ||
73 | %description apidocs -l pl.UTF-8 | |
74 | Dokumentacja API %{module}. | |
75 | ||
76 | %prep | |
77 | %setup -q -n %{module}-%{version} | |
365e6511 JK |
78 | |
79 | %build | |
80 | %if %{with python2} | |
81 | CC="%{__cc}" \ | |
82 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ | |
747a9fbf | 83 | %py_build %{?with_tests:test} |
365e6511 JK |
84 | |
85 | %if %{with doc} | |
86 | cd Doc | |
87 | PYTHONPATH=../build-2/lib sphinx-build -b html -d .build/doctrees . .build/html | |
88 | rm -rf .build/html/_sources | |
89 | cd .. | |
90 | %endif | |
91 | %endif | |
92 | ||
93 | %if %{with python3} | |
94 | CC="%{__cc}" \ | |
95 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ | |
747a9fbf | 96 | %py3_build %{?with_tests:test} |
365e6511 JK |
97 | %endif |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with python2} | |
747a9fbf | 103 | %py_install |
365e6511 JK |
104 | |
105 | %py_postclean | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
747a9fbf | 109 | %py3_install |
365e6511 JK |
110 | %endif |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %if %{with python2} | |
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc *.txt README.rst | |
119 | %dir %{py_sitedir}/%{module} | |
120 | %{py_sitedir}/%{module}/*.py[co] | |
121 | %dir %{py_sitedir}/%{module}/dummy | |
122 | %{py_sitedir}/%{module}/dummy/*.py[co] | |
365e6511 JK |
123 | %{py_sitedir}/_%{module}.so |
124 | %{py_sitedir}/%{module}-%{version}-py*.egg-info | |
125 | %endif | |
126 | ||
127 | %if %{with python3} | |
128 | %files -n python3-%{module} | |
129 | %defattr(644,root,root,755) | |
130 | %doc *.txt README.rst | |
131 | %{py3_sitescriptdir}/%{module} | |
132 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
133 | %endif | |
134 | ||
135 | %if %{with doc} | |
136 | %files apidocs | |
137 | %defattr(644,root,root,755) | |
138 | %doc Doc/.build/html/* | |
139 | %endif |