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