]>
Commit | Line | Data |
---|---|---|
44562528 JK |
1 | # |
2 | # Conditional build: | |
aae8302a JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
44562528 | 5 | %bcond_without python2 # CPython 2.x module |
6e10e0c3 | 6 | %bcond_with python3 # CPython 3.x module |
44562528 | 7 | |
6e10e0c3 | 8 | %define module kombu |
44562528 | 9 | Summary: Messaging library for Python |
aae8302a | 10 | Summary(pl.UTF-8): Biblioteka komunikatów dla Pythona |
be70ea90 | 11 | Name: python-%{module} |
58de0877 | 12 | # keep 4.x here for python2 support |
aae8302a | 13 | Version: 4.6.11 |
bfb1a139 | 14 | Release: 3 |
58de0877 | 15 | License: BSD |
be70ea90 | 16 | Group: Development/Languages/Python |
aae8302a JB |
17 | #Source0Download: https://pypi.org/simple/kombu/ |
18 | Source0: https://files.pythonhosted.org/packages/source/k/kombu/%{module}-%{version}.tar.gz | |
19 | # Source0-md5: 759b31d97fc11c4cb16f6d293723e85e | |
20 | URL: https://pypi.org/project/kombu/ | |
44562528 | 21 | %if %{with python2} |
f5b96fc9 | 22 | BuildRequires: python-modules >= 1:2.7 |
aae8302a JB |
23 | BuildRequires: python-setuptools >= 1:20.6.7 |
24 | %if %{with tests} | |
25 | BuildRequires: python-Pyro4 | |
26 | BuildRequires: python-amqp >= 2.6.0 | |
27 | BuildRequires: python-botocore | |
28 | BuildRequires: python-case >= 1.5.2 | |
29 | BuildRequires: python-importlib_metadata >= 0.18 | |
44562528 | 30 | BuildRequires: python-nose |
aae8302a JB |
31 | BuildRequires: python-pytest |
32 | BuildRequires: python-pytz | |
44562528 JK |
33 | %endif |
34 | %endif | |
35 | %if %{with python3} | |
aae8302a JB |
36 | BuildRequires: python3-modules >= 1:3.5 |
37 | BuildRequires: python3-setuptools >= 1:20.6.7 | |
44562528 | 38 | %if %{with tests} |
aae8302a JB |
39 | BuildRequires: python3-Pyro4 |
40 | BuildRequires: python3-amqp >= 2.6.0 | |
41 | BuildRequires: python3-amqp < 2.7 | |
42 | BuildRequires: python3-botocore | |
43 | BuildRequires: python3-case >= 1.5.2 | |
44 | %if "%{py3_ver}" < "3.8" | |
45 | BuildRequires: python3-importlib_metadata >= 0.18 | |
46 | %endif | |
44562528 | 47 | BuildRequires: python3-nose |
44562528 | 48 | %endif |
65a38e1a | 49 | %endif |
aae8302a JB |
50 | BuildRequires: rpm-pythonprov |
51 | BuildRequires: rpmbuild(macros) >= 1.714 | |
52 | %if %{with doc} | |
53 | BuildRequires: python-amqp | |
54 | BuildRequires: python-sphinx_celery | |
55 | BuildRequires: python-sphinxcontrib-issuetracker | |
56 | BuildRequires: sphinx-pdg-2 | |
44562528 | 57 | %endif |
aae8302a | 58 | Requires: python-modules >= 1:2.7 |
be70ea90 | 59 | BuildArch: noarch |
60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
61 | ||
62 | %description | |
333ebabd | 63 | The aim of Kombu is to make messaging in Python as easy as possible by |
44562528 | 64 | providing an idiomatic high-level interface for the AMQ protocol, and |
333ebabd | 65 | also provide proven and tested solutions to common messaging problems. |
be70ea90 | 66 | |
aae8302a JB |
67 | %description -l pl.UTF-8 |
68 | Celem Kombu jest jak największe ułatwienie wymiany komunikatów w | |
69 | Pythonie poprzez dostarczenie idomatycznego, wysokopoziomowego | |
70 | interfejsu do protokołu AMQ oraz sprawdzonych rozwiązań powszechnych | |
71 | problemów związanych z komunikowaniem. | |
72 | ||
44562528 JK |
73 | %package -n python3-%{module} |
74 | Summary: Messaging library for Python | |
aae8302a | 75 | Summary(pl.UTF-8): Biblioteka komunikatów dla Pythona |
44562528 | 76 | Group: Libraries/Python |
aae8302a | 77 | Requires: python3-modules >= 1:3.5 |
44562528 JK |
78 | |
79 | %description -n python3-%{module} | |
80 | The aim of Kombu is to make messaging in Python as easy as possible by | |
81 | providing an idiomatic high-level interface for the AMQ protocol, and | |
82 | also provide proven and tested solutions to common messaging problems. | |
83 | ||
aae8302a JB |
84 | %description -n python3-%{module} -l pl.UTF-8 |
85 | Celem Kombu jest jak największe ułatwienie wymiany komunikatów w | |
86 | Pythonie poprzez dostarczenie idomatycznego, wysokopoziomowego | |
87 | interfejsu do protokołu AMQ oraz sprawdzonych rozwiązań powszechnych | |
88 | problemów związanych z komunikowaniem. | |
89 | ||
44562528 | 90 | %package apidocs |
aae8302a JB |
91 | Summary: API documentation for kombu module |
92 | Summary(pl.UTF-8): Dokumentacja API modułu kombu | |
44562528 | 93 | Group: Documentation |
aae8302a | 94 | Obsoletes: python3-kombu-apidocs < 5 |
44562528 JK |
95 | |
96 | %description apidocs | |
aae8302a | 97 | API documentation for kombu module. |
44562528 JK |
98 | |
99 | %description apidocs -l pl.UTF-8 | |
aae8302a | 100 | Dokumentacja API modułu kombu. |
65a38e1a | 101 | |
be70ea90 | 102 | %prep |
103 | %setup -q -n %{module}-%{version} | |
104 | ||
105 | %build | |
44562528 | 106 | %if %{with python2} |
aae8302a | 107 | %py_build |
44562528 | 108 | |
aae8302a JB |
109 | %if %{with tests} |
110 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
111 | PYTEST_PLUGINS="case.pytest" \ | |
112 | %{__python} -m pytest t/unit | |
44562528 JK |
113 | %endif |
114 | %endif | |
115 | ||
116 | %if %{with python3} | |
aae8302a | 117 | %py3_build |
65a38e1a | 118 | |
aae8302a JB |
119 | %if %{with tests} |
120 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
121 | PYTEST_PLUGINS="case.pytest" \ | |
122 | %{__python3} -m pytest t/unit | |
65a38e1a | 123 | %endif |
44562528 | 124 | %endif |
be70ea90 | 125 | |
aae8302a JB |
126 | %if %{with doc} |
127 | %{__make} -C docs html \ | |
128 | SPHINXBUILD=sphinx-build-2 | |
129 | %endif | |
130 | ||
be70ea90 | 131 | %install |
132 | rm -rf $RPM_BUILD_ROOT | |
44562528 JK |
133 | |
134 | %if %{with python2} | |
d357e5f5 | 135 | %py_install |
be70ea90 | 136 | |
137 | %py_postclean | |
44562528 JK |
138 | %endif |
139 | ||
140 | %if %{with python3} | |
d357e5f5 | 141 | %py3_install |
44562528 | 142 | %endif |
be70ea90 | 143 | |
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
65a38e1a | 147 | %if %{with python2} |
be70ea90 | 148 | %files |
14a88007 | 149 | %defattr(644,root,root,755) |
4f09112b | 150 | %doc AUTHORS FAQ LICENSE README.rst THANKS TODO |
14a88007 | 151 | %{py_sitescriptdir}/%{module} |
14a88007 | 152 | %{py_sitescriptdir}/%{module}-*.egg-info |
65a38e1a JK |
153 | %endif |
154 | ||
155 | %if %{with python3} | |
44562528 JK |
156 | %files -n python3-%{module} |
157 | %defattr(644,root,root,755) | |
4f09112b | 158 | %doc AUTHORS FAQ LICENSE README.rst THANKS TODO |
44562528 JK |
159 | %{py3_sitescriptdir}/%{module} |
160 | %{py3_sitescriptdir}/%{module}-*.egg-info | |
aae8302a | 161 | %endif |
44562528 JK |
162 | |
163 | %if %{with doc} | |
aae8302a | 164 | %files apidocs |
44562528 | 165 | %defattr(644,root,root,755) |
aae8302a | 166 | %doc docs/_build/html/{_modules,_static,reference,userguide,*.html,*.js} |
14a88007 | 167 | %endif |