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