]> git.pld-linux.org Git - packages/python-kombu.git/blob - python-kombu.spec
65f1533440bd7f60e8a85ed498eb9a6d98f09dd8
[packages/python-kombu.git] / python-kombu.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # build doc (uses network)
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:        4.2.1
12 Release:        2
13 License:        BSD-like
14 Group:          Development/Languages/Python
15 Source0:        https://files.pythonhosted.org/packages/source/k/kombu/%{module}-%{version}.tar.gz
16 # Source0-md5:  15e43bdeacef6805a61e2cdee717f748
17 URL:            http://pypi.python.org/pypi/kombu
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.710
20 %if %{with python2}
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-mock
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-nose
26 %endif
27 %if %{with doc}
28 BuildRequires:  python-amqp
29 BuildRequires:  python-django
30 BuildRequires:  python-sphinxcontrib-issuetracker
31 BuildRequires:  sphinx-pdg-2
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 %if %{with doc}
41 BuildRequires:  python3-amqp
42 BuildRequires:  python3-django
43 BuildRequires:  python3-sphinxcontrib-issuetracker
44 BuildRequires:  sphinx-pdg-3
45 %endif
46 %endif
47 Requires:       python-amqp >= 1.4.7
48 Requires:       python-anyjson >= 0.3.3
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 The aim of Kombu is to make messaging in Python as easy as possible by
54 providing an idiomatic high-level interface for the AMQ protocol, and
55 also provide proven and tested solutions to common messaging problems.
56
57 %package -n python3-%{module}
58 Summary:        Messaging library for Python
59 Group:          Libraries/Python
60 Requires:       python3-modules
61
62 %description -n python3-%{module}
63 The aim of Kombu is to make messaging in Python as easy as possible by
64 providing an idiomatic high-level interface for the AMQ protocol, and
65 also provide proven and tested solutions to common messaging problems.
66
67 %package apidocs
68 Summary:        %{module} API documentation
69 Summary(pl.UTF-8):      Dokumentacja API %{module}
70 Group:          Documentation
71
72 %description apidocs
73 API documentation for %{module}.
74
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API %{module}.
77
78 %package -n python3-%{module}-apidocs
79 Summary:        %{module} API documentation
80 Summary(pl.UTF-8):      Dokumentacja API %{module}
81 Group:          Documentation
82
83 %description -n python3-%{module}-apidocs
84 API documentation for %{module}.
85
86 %description -n python3-%{module}-apidocs -l pl.UTF-8
87 Dokumentacja API %{module}.
88
89 %prep
90 %setup -q -n %{module}-%{version}
91
92 %build
93 %if %{with python2}
94 %py_build %{?with_tests:test}
95
96 %if %{with doc}
97 cd docs
98 PYTHONPATH=../build-2/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-2
99 rm -rf .build/html/_sources
100 mv .build .build2
101 cd ..
102 %endif
103 %endif
104
105 %if %{with python3}
106 %py3_build %{?with_tests:test}
107
108 %if %{with doc}
109 cd docs
110 PYTHONPATH=../build-3/lib %{__make} -j1 html SPHINXBUILD=sphinx-build-3
111 rm -rf .build/html/_sources
112 mv .build .build3
113 cd ..
114 %endif
115 %endif
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 %if %{with python2}
121 %py_install
122
123 %py_postclean
124 %endif
125
126 %if %{with python3}
127 %py3_install
128 %endif
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with python2}
134 %files
135 %defattr(644,root,root,755)
136 %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO
137 %{py_sitescriptdir}/%{module}
138 %{py_sitescriptdir}/%{module}-*.egg-info
139
140 %if %{with doc}
141 %files apidocs
142 %defattr(644,root,root,755)
143 %doc docs/.build2/html/*
144 %endif
145 %endif
146
147 %if %{with python3}
148 %files -n python3-%{module}
149 %defattr(644,root,root,755)
150 %doc AUTHORS Changelog FAQ LICENSE README.rst THANKS TODO
151 %{py3_sitescriptdir}/%{module}
152 %{py3_sitescriptdir}/%{module}-*.egg-info
153
154 %if %{with doc}
155 %files -n python3-%{module}-apidocs
156 %defattr(644,root,root,755)
157 %doc docs/.build3/html/*
158 %endif
159 %endif
This page took 0.051932 seconds and 2 git commands to generate.