]>
Commit | Line | Data |
---|---|---|
44562528 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
4 | %bcond_with tests # do perform "make test" | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
be70ea90 | 8 | %define module kombu |
44562528 | 9 | Summary: Messaging library for Python |
be70ea90 | 10 | Name: python-%{module} |
44562528 | 11 | Version: 3.0.29 |
0bf93e21 | 12 | Release: 1 |
be70ea90 | 13 | License: BSD-like |
14 | Group: Development/Languages/Python | |
15 | Source0: http://pypi.python.org/packages/source/k/%{module}/%{module}-%{version}.tar.gz | |
44562528 | 16 | # Source0-md5: 892bf89ee247c0d16d2bdd63f1ddf4c5 |
0bf93e21 | 17 | URL: http://pypi.python.org/pypi/kombu |
be70ea90 | 18 | BuildRequires: rpm-pythonprov |
44562528 JK |
19 | BuildRequires: rpmbuild(macros) >= 1.612 |
20 | %if %{with python2} | |
21 | BuildRequires: python-setuptools | |
22 | %if %{with tests} | |
23 | BuildRequires: python-mock | |
24 | BuildRequires: python-modules | |
25 | BuildRequires: python-nose | |
26 | %endif | |
27 | %if %{with doc} | |
28 | BuildRequires: python-django | |
29 | BuildRequires: python-sphinxcontrib-issuetracker | |
30 | BuildRequires: sphinx-pdg | |
31 | %endif | |
32 | %endif | |
33 | %if %{with python3} | |
34 | BuildRequires: python3-setuptools | |
35 | %if %{with tests} | |
36 | BuildRequires: python3-mock | |
37 | BuildRequires: python3-nose | |
38 | BuildRequires: python3-unittest2 | |
39 | %endif | |
40 | %endif | |
41 | Requires: python-amqp >= 1.4.7 | |
42 | Requires: python-anyjson >= 0.3.3 | |
be70ea90 | 43 | BuildArch: noarch |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
333ebabd | 47 | The aim of Kombu is to make messaging in Python as easy as possible by |
44562528 | 48 | providing an idiomatic high-level interface for the AMQ protocol, and |
333ebabd | 49 | also provide proven and tested solutions to common messaging problems. |
be70ea90 | 50 | |
44562528 JK |
51 | %package -n python3-%{module} |
52 | Summary: Messaging library for Python | |
53 | Group: Libraries/Python | |
54 | Requires: python3-modules | |
55 | ||
56 | %description -n python3-%{module} | |
57 | The aim of Kombu is to make messaging in Python as easy as possible by | |
58 | providing an idiomatic high-level interface for the AMQ protocol, and | |
59 | also provide proven and tested solutions to common messaging problems. | |
60 | ||
61 | %package apidocs | |
62 | Summary: %{module} API documentation | |
63 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
64 | Group: Documentation | |
65 | ||
66 | %description apidocs | |
67 | API documentation for %{module}. | |
68 | ||
69 | %description apidocs -l pl.UTF-8 | |
70 | Dokumentacja API %{module}. | |
71 | ||
be70ea90 | 72 | %prep |
73 | %setup -q -n %{module}-%{version} | |
74 | ||
75 | %build | |
44562528 JK |
76 | %if %{with python2} |
77 | %{__python} setup.py build --build-base build-2 %{?with_tests:test} | |
78 | ||
79 | %if %{with doc} | |
80 | cd docs | |
81 | PYTHONPATH=../build-2/lib %{__make} -j1 html | |
82 | rm -rf .build/html/_sources | |
83 | cd .. | |
84 | %endif | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %{__python3} setup.py build --build-base build-3 %{?with_tests:test} | |
89 | %endif | |
be70ea90 | 90 | |
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
44562528 JK |
93 | |
94 | %if %{with python2} | |
95 | %{__python} setup.py \ | |
96 | build --build-base build-2 \ | |
97 | install --skip-build \ | |
be70ea90 | 98 | --optimize=2 \ |
99 | --root=$RPM_BUILD_ROOT | |
100 | ||
101 | %py_postclean | |
44562528 JK |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
105 | %{__python3} setup.py \ | |
106 | build --build-base build-3 \ | |
107 | install --skip-build \ | |
108 | --optimize=2 \ | |
109 | --root=$RPM_BUILD_ROOT | |
110 | %endif | |
be70ea90 | 111 | |
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
be70ea90 | 115 | %files |
14a88007 | 116 | %defattr(644,root,root,755) |
44562528 | 117 | %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO |
14a88007 | 118 | %{py_sitescriptdir}/%{module} |
14a88007 | 119 | %{py_sitescriptdir}/%{module}-*.egg-info |
44562528 JK |
120 | |
121 | %files -n python3-%{module} | |
122 | %defattr(644,root,root,755) | |
123 | %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO | |
124 | %{py3_sitescriptdir}/%{module} | |
125 | %{py3_sitescriptdir}/%{module}-*.egg-info | |
126 | ||
127 | %if %{with doc} | |
128 | %files apidocs | |
129 | %defattr(644,root,root,755) | |
130 | %doc docs/.build/html/* | |
14a88007 | 131 | %endif |