]>
Commit | Line | Data |
---|---|---|
cc864027 JK |
1 | # |
2 | # Conditional build: | |
ff85666b JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
cc864027 | 5 | |
d2014c61 ER |
6 | %define module amqp |
7 | %define pypi_name amqp | |
cc864027 JK |
8 | Summary: AMQP 0.9.1 client library |
9 | Summary(pl.UTF-8): Biblioteka kliencka AMQP 0.9.1 | |
f90ca5d6 JB |
10 | Name: python3-%{module} |
11 | Version: 5.0.5 | |
f8376303 | 12 | Release: 3 |
ff85666b | 13 | License: BSD |
cc864027 | 14 | Group: Libraries/Python |
ff85666b | 15 | Source0: https://files.pythonhosted.org/packages/source/a/amqp/%{module}-%{version}.tar.gz |
f90ca5d6 | 16 | # Source0-md5: 4b46b380d33d3fb8faccba415a1beaff |
ff85666b | 17 | URL: https://amqp.readthedocs.io/ |
f90ca5d6 JB |
18 | BuildRequires: python3-modules >= 1:3.6 |
19 | BuildRequires: python3-setuptools >= 1:20.6.7 | |
cc864027 | 20 | %if %{with tests} |
ff85666b JB |
21 | BuildRequires: python3-case >= 1.3.1 |
22 | BuildRequires: python3-pytest >= 3.0 | |
23 | BuildRequires: python3-pytest-rerunfailures >= 6.0 | |
f90ca5d6 | 24 | BuildRequires: python3-vine >= 5.0.0 |
8df16ed9 | 25 | %endif |
f90ca5d6 JB |
26 | BuildRequires: rpm-pythonprov |
27 | BuildRequires: rpmbuild(macros) >= 1.714 | |
ff85666b | 28 | %if %{with doc} |
f90ca5d6 JB |
29 | BuildRequires: python3-sphinx_celery >= 1.4.8 |
30 | BuildRequires: sphinx-pdg-3 | |
cc864027 | 31 | %endif |
f90ca5d6 | 32 | Requires: python3-modules >= 1:3.6 |
cc864027 JK |
33 | BuildArch: noarch |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | This is a fork of amqplib which was originally written by Barry | |
38 | Pederson. It is maintained by the Celery project, and used by kombu as | |
39 | a pure python alternative when librabbitmq is not available. | |
40 | ||
41 | This library should be API compatible with librabbitmq. | |
42 | ||
ff85666b JB |
43 | %description -l pl.UTF-8 |
44 | Ten projekt to odgałęzienie amqplib, pierwotnie napisane przez | |
45 | Barry'ego Pedersona. Jest utrzymywane przez projekt Celery i używane | |
46 | przez kombu jako czysto pythonowa alternatywa dla librabbitmq, jeśli | |
47 | ta nie jest dostępna. | |
48 | ||
49 | Biblioteka powinna być zgodna co do API z librabbitmq. | |
50 | ||
cc864027 | 51 | %package apidocs |
ff85666b JB |
52 | Summary: API documentation for amqp module |
53 | Summary(pl.UTF-8): Dokumentacja API modułu amqp | |
cc864027 JK |
54 | Group: Documentation |
55 | ||
56 | %description apidocs | |
ff85666b | 57 | API documentation for amqp module. |
cc864027 JK |
58 | |
59 | %description apidocs -l pl.UTF-8 | |
ff85666b | 60 | Dokumentacja API modułu amqp. |
8df16ed9 | 61 | |
cc864027 JK |
62 | %prep |
63 | %setup -q -n %{module}-%{version} | |
64 | ||
65 | %build | |
ff85666b | 66 | %py3_build |
8df16ed9 | 67 | |
ff85666b JB |
68 | %if %{with tests} |
69 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
70 | PYTEST_PLUGINS="case.pytest" \ | |
71 | %{__python3} -m pytest t/unit | |
8df16ed9 | 72 | %endif |
cc864027 | 73 | |
ff85666b JB |
74 | %if %{with doc} |
75 | %{__make} -C docs html \ | |
f90ca5d6 | 76 | SPHINXBUILD=sphinx-build-3 |
ff85666b JB |
77 | %endif |
78 | ||
cc864027 JK |
79 | %install |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
1475cc83 | 82 | %py3_install |
cc864027 JK |
83 | |
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
cc864027 JK |
87 | %files |
88 | %defattr(644,root,root,755) | |
ff85666b | 89 | %doc Changelog LICENSE README.rst |
cc864027 JK |
90 | %{py3_sitescriptdir}/%{module} |
91 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
cc864027 JK |
92 | |
93 | %if %{with doc} | |
ff85666b | 94 | %files apidocs |
cc864027 | 95 | %defattr(644,root,root,755) |
ff85666b | 96 | %doc docs/_build/html/{_modules,_static,reference,*.html,*.js} |
cc864027 | 97 | %endif |