0aeab6996eaaf0c2ed126e1019d819a3a8fe87e3
[packages/python-billiard.git] / python-billiard.spec
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
9 Summary:        Multiprocessing Pool Extensions
10 Name:           python-%{module}
11 Version:        3.3.0.21
12 Release:        3
13 License:        BSD
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/source/b/billiard/%{module}-%{version}.tar.gz
16 # Source0-md5:  5304a48344d8f7e821d06f57da8af1f4
17 Patch0:         unittest2.patch
18 URL:            https://github.com/celery/billiard
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.710
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.7
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
66
67 %description apidocs
68 API documentation for %{module}.
69
70 %description apidocs -l pl.UTF-8
71 Dokumentacja API %{module}.
72
73 %prep
74 %setup -q -n %{module}-%{version}
75 %patch0 -p1
76
77 %build
78 %if %{with python2}
79 CC="%{__cc}" \
80 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
81 %py_build %{?with_tests:test}
82
83 %if %{with doc}
84 cd Doc
85 PYTHONPATH=../build-2/lib sphinx-build -b html -d .build/doctrees . .build/html
86 rm -rf .build/html/_sources
87 cd ..
88 %endif
89 %endif
90
91 %if %{with python3}
92 CC="%{__cc}" \
93 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
94 %py3_build %{?with_tests:test}
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %py_install
102
103 %py_postclean
104 %endif
105
106 %if %{with python3}
107 %py3_install
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc *.txt README.rst
117 %dir %{py_sitedir}/%{module}
118 %{py_sitedir}/%{module}/*.py[co]
119 %dir %{py_sitedir}/%{module}/dummy
120 %{py_sitedir}/%{module}/dummy/*.py[co]
121 %dir %{py_sitedir}/%{module}/py2
122 %{py_sitedir}/%{module}/py2/*.py[co]
123 %dir %{py_sitedir}/%{module}/tests
124 %{py_sitedir}/%{module}/tests/*.py[co]
125 %{py_sitedir}/_%{module}.so
126 %{py_sitedir}/%{module}-%{version}-py*.egg-info
127 %endif
128
129 %if %{with python3}
130 %files -n python3-%{module}
131 %defattr(644,root,root,755)
132 %doc *.txt README.rst
133 %{py3_sitescriptdir}/%{module}
134 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
135 %endif
136
137 %if %{with doc}
138 %files apidocs
139 %defattr(644,root,root,755)
140 %doc Doc/.build/html/*
141 %endif
This page took 0.050121 seconds and 2 git commands to generate.