]> git.pld-linux.org Git - packages/python-kombu.git/blob - python-kombu.spec
'unittest2' functionality already in py 2.7 and 3.x
[packages/python-kombu.git] / python-kombu.spec
1 #
2 # Conditional build:
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
7
8 %define         module  kombu
9 Summary:        Messaging library for Python
10 Name:           python-%{module}
11 Version:        3.0.29
12 Release:        1
13 License:        BSD-like
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
21 %if %{with python2}
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-mock
25 BuildRequires:  python-modules > 1:2.7
26 BuildRequires:  python-nose
27 %endif
28 %if %{with doc}
29 BuildRequires:  python-django
30 BuildRequires:  python-sphinxcontrib-issuetracker
31 BuildRequires:  sphinx-pdg
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-mock
38 BuildRequires:  python3-nose
39 %endif
40 %endif
41 Requires:       python-amqp >= 1.4.7
42 Requires:       python-anyjson >= 0.3.3
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
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.
50
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
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %patch0 -p1
76
77 %build
78 %if %{with python2}
79 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
80
81 %if %{with doc}
82 cd docs
83 PYTHONPATH=../build-2/lib %{__make} -j1 html
84 rm -rf .build/html/_sources
85 cd ..
86 %endif
87 %endif
88
89 %if %{with python3}
90 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %{__python} setup.py \
98         build --build-base build-2 \
99         install --skip-build \
100         --optimize=2 \
101         --root=$RPM_BUILD_ROOT
102
103 %py_postclean
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
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %files
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
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/*
133 %endif
This page took 0.064618 seconds and 4 git commands to generate.