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