3 %bcond_without doc # don't build doc
4 %bcond_with tests # do perform tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: Messaging library for Python
10 Name: python-%{module}
14 Group: Development/Languages/Python
15 Source0: http://pypi.python.org/packages/source/k/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 892bf89ee247c0d16d2bdd63f1ddf4c5
17 Patch0: unittest2.patch
18 URL: http://pypi.python.org/pypi/kombu
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.612
22 BuildRequires: python-setuptools
24 BuildRequires: python-mock
25 BuildRequires: python-modules > 1:2.7
26 BuildRequires: python-nose
29 BuildRequires: python-django
30 BuildRequires: python-sphinxcontrib-issuetracker
31 BuildRequires: sphinx-pdg
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-mock
38 BuildRequires: python3-nose
41 Requires: python-amqp >= 1.4.7
42 Requires: python-anyjson >= 0.3.3
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 The aim of Kombu is to make messaging in Python as easy as possible by
48 providing an idiomatic high-level interface for the AMQ protocol, and
49 also provide proven and tested solutions to common messaging problems.
51 %package -n python3-%{module}
52 Summary: Messaging library for Python
53 Group: Libraries/Python
54 Requires: python3-modules
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.
62 Summary: %{module} API documentation
63 Summary(pl.UTF-8): Dokumentacja API %{module}
67 API documentation for %{module}.
69 %description apidocs -l pl.UTF-8
70 Dokumentacja API %{module}.
73 %setup -q -n %{module}-%{version}
79 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
83 PYTHONPATH=../build-2/lib %{__make} -j1 html
84 rm -rf .build/html/_sources
90 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
94 rm -rf $RPM_BUILD_ROOT
97 %{__python} setup.py \
98 build --build-base build-2 \
99 install --skip-build \
101 --root=$RPM_BUILD_ROOT
107 %{__python3} setup.py \
108 build --build-base build-3 \
109 install --skip-build \
111 --root=$RPM_BUILD_ROOT
115 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO
120 %{py_sitescriptdir}/%{module}
121 %{py_sitescriptdir}/%{module}-*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO
126 %{py3_sitescriptdir}/%{module}
127 %{py3_sitescriptdir}/%{module}-*.egg-info
131 %defattr(644,root,root,755)
132 %doc docs/.build/html/*