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