]>
Commit | Line | Data |
---|---|---|
44562528 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
53fce816 | 4 | %bcond_with tests # do perform tests |
44562528 JK |
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 |
65a38e1a | 12 | Release: 4 |
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 |
53fce816 | 17 | Patch0: unittest2.patch |
0bf93e21 | 18 | URL: http://pypi.python.org/pypi/kombu |
be70ea90 | 19 | BuildRequires: rpm-pythonprov |
082fde91 | 20 | BuildRequires: rpmbuild(macros) >= 1.710 |
44562528 JK |
21 | %if %{with python2} |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-mock | |
f5b96fc9 | 25 | BuildRequires: python-modules >= 1:2.7 |
44562528 JK |
26 | BuildRequires: python-nose |
27 | %endif | |
28 | %if %{with doc} | |
65a38e1a | 29 | BuildRequires: python-amqp |
44562528 JK |
30 | BuildRequires: python-django |
31 | BuildRequires: python-sphinxcontrib-issuetracker | |
65a38e1a | 32 | BuildRequires: sphinx-pdg-2 |
44562528 JK |
33 | %endif |
34 | %endif | |
35 | %if %{with python3} | |
36 | BuildRequires: python3-setuptools | |
37 | %if %{with tests} | |
38 | BuildRequires: python3-mock | |
39 | BuildRequires: python3-nose | |
44562528 | 40 | %endif |
65a38e1a JK |
41 | %if %{with doc} |
42 | BuildRequires: python3-amqp | |
43 | BuildRequires: python3-django | |
44 | BuildRequires: python3-sphinxcontrib-issuetracker | |
45 | BuildRequires: sphinx-pdg-3 | |
46 | %endif | |
44562528 JK |
47 | %endif |
48 | Requires: python-amqp >= 1.4.7 | |
49 | Requires: python-anyjson >= 0.3.3 | |
be70ea90 | 50 | BuildArch: noarch |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | %description | |
333ebabd | 54 | The aim of Kombu is to make messaging in Python as easy as possible by |
44562528 | 55 | providing an idiomatic high-level interface for the AMQ protocol, and |
333ebabd | 56 | also provide proven and tested solutions to common messaging problems. |
be70ea90 | 57 | |
44562528 JK |
58 | %package -n python3-%{module} |
59 | Summary: Messaging library for Python | |
60 | Group: Libraries/Python | |
61 | Requires: python3-modules | |
62 | ||
63 | %description -n python3-%{module} | |
64 | The aim of Kombu is to make messaging in Python as easy as possible by | |
65 | providing an idiomatic high-level interface for the AMQ protocol, and | |
66 | also provide proven and tested solutions to common messaging problems. | |
67 | ||
68 | %package apidocs | |
69 | Summary: %{module} API documentation | |
70 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
71 | Group: Documentation | |
72 | ||
73 | %description apidocs | |
74 | API documentation for %{module}. | |
75 | ||
76 | %description apidocs -l pl.UTF-8 | |
77 | Dokumentacja API %{module}. | |
78 | ||
65a38e1a JK |
79 | %package -n python3-%{module}-apidocs |
80 | Summary: %{module} API documentation | |
81 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
82 | Group: Documentation | |
83 | ||
84 | %description -n python3-%{module}-apidocs | |
85 | API documentation for %{module}. | |
86 | ||
87 | %description -n python3-%{module}-apidocs -l pl.UTF-8 | |
88 | Dokumentacja API %{module}. | |
89 | ||
be70ea90 | 90 | %prep |
91 | %setup -q -n %{module}-%{version} | |
92 | ||
53fce816 JK |
93 | %patch0 -p1 |
94 | ||
be70ea90 | 95 | %build |
44562528 | 96 | %if %{with python2} |
d357e5f5 | 97 | %py_build %{?with_tests:test} |
44562528 JK |
98 | |
99 | %if %{with doc} | |
100 | cd docs | |
65a38e1a | 101 | PYTHONPATH=../build-2/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-2 |
44562528 | 102 | rm -rf .build/html/_sources |
65a38e1a | 103 | mv .build .build2 |
44562528 JK |
104 | cd .. |
105 | %endif | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
d357e5f5 | 109 | %py3_build %{?with_tests:test} |
65a38e1a JK |
110 | |
111 | %if %{with doc} | |
112 | cd docs | |
113 | PYTHONPATH=../build-3/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-3 | |
114 | rm -rf .build/html/_sources | |
115 | mv .build .build3 | |
116 | cd .. | |
117 | %endif | |
44562528 | 118 | %endif |
be70ea90 | 119 | |
120 | %install | |
121 | rm -rf $RPM_BUILD_ROOT | |
44562528 JK |
122 | |
123 | %if %{with python2} | |
d357e5f5 | 124 | %py_install |
be70ea90 | 125 | |
126 | %py_postclean | |
44562528 JK |
127 | %endif |
128 | ||
129 | %if %{with python3} | |
d357e5f5 | 130 | %py3_install |
44562528 | 131 | %endif |
be70ea90 | 132 | |
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
65a38e1a | 136 | %if %{with python2} |
be70ea90 | 137 | %files |
14a88007 | 138 | %defattr(644,root,root,755) |
44562528 | 139 | %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO |
14a88007 | 140 | %{py_sitescriptdir}/%{module} |
14a88007 | 141 | %{py_sitescriptdir}/%{module}-*.egg-info |
44562528 | 142 | |
65a38e1a JK |
143 | %if %{with doc} |
144 | %files apidocs | |
145 | %defattr(644,root,root,755) | |
146 | %doc docs/.build2/html/* | |
147 | %endif | |
148 | %endif | |
149 | ||
150 | %if %{with python3} | |
44562528 JK |
151 | %files -n python3-%{module} |
152 | %defattr(644,root,root,755) | |
153 | %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO | |
154 | %{py3_sitescriptdir}/%{module} | |
155 | %{py3_sitescriptdir}/%{module}-*.egg-info | |
156 | ||
157 | %if %{with doc} | |
65a38e1a | 158 | %files -n python3-%{module}-apidocs |
44562528 | 159 | %defattr(644,root,root,755) |
65a38e1a JK |
160 | %doc docs/.build3/html/* |
161 | %endif | |
14a88007 | 162 | %endif |