]> git.pld-linux.org Git - packages/python-kombu.git/blob - python-kombu.spec
ecee538d84092b2d3f310218335d34422cc930e9
[packages/python-kombu.git] / python-kombu.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module
7
8 %define         module  kombu
9 Summary:        Messaging library for Python
10 Summary(pl.UTF-8):      Biblioteka komunikatów dla Pythona
11 Name:           python-%{module}
12 # keep 4.x here for python2 support
13 Version:        4.6.11
14 Release:        2
15 License:        BSD
16 Group:          Development/Languages/Python
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
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
30 BuildRequires:  python-nose
31 BuildRequires:  python-pytest
32 BuildRequires:  python-pytz
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.5
37 BuildRequires:  python3-setuptools >= 1:20.6.7
38 %if %{with tests}
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
47 BuildRequires:  python3-nose
48 %endif
49 %endif
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
57 %endif
58 Requires:       python-modules >= 1:2.7
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
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 %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
73 %package -n python3-%{module}
74 Summary:        Messaging library for Python
75 Summary(pl.UTF-8):      Biblioteka komunikatów dla Pythona
76 Group:          Libraries/Python
77 Requires:       python3-modules >= 1:3.5
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
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
90 %package apidocs
91 Summary:        API documentation for kombu module
92 Summary(pl.UTF-8):      Dokumentacja API modułu kombu
93 Group:          Documentation
94 Obsoletes:      python3-kombu-apidocs < 5
95
96 %description apidocs
97 API documentation for kombu module.
98
99 %description apidocs -l pl.UTF-8
100 Dokumentacja API modułu kombu.
101
102 %prep
103 %setup -q -n %{module}-%{version}
104
105 %build
106 %if %{with python2}
107 %py_build
108
109 %if %{with tests}
110 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
111 PYTEST_PLUGINS="case.pytest" \
112 %{__python} -m pytest t/unit
113 %endif
114 %endif
115
116 %if %{with python3}
117 %py3_build
118
119 %if %{with tests}
120 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
121 PYTEST_PLUGINS="case.pytest" \
122 %{__python3} -m pytest t/unit
123 %endif
124 %endif
125
126 %if %{with doc}
127 %{__make} -C docs html \
128         SPHINXBUILD=sphinx-build-2
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %py_install
136
137 %py_postclean
138 %endif
139
140 %if %{with python3}
141 %py3_install
142 %endif
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %if %{with python2}
148 %files
149 %defattr(644,root,root,755)
150 %doc AUTHORS FAQ LICENSE README.rst THANKS TODO
151 %{py_sitescriptdir}/%{module}
152 %{py_sitescriptdir}/%{module}-*.egg-info
153 %endif
154
155 %if %{with python3}
156 %files -n python3-%{module}
157 %defattr(644,root,root,755)
158 %doc AUTHORS FAQ LICENSE README.rst THANKS TODO
159 %{py3_sitescriptdir}/%{module}
160 %{py3_sitescriptdir}/%{module}-*.egg-info
161 %endif
162
163 %if %{with doc}
164 %files apidocs
165 %defattr(644,root,root,755)
166 %doc docs/_build/html/{_modules,_static,reference,userguide,*.html,*.js}
167 %endif
This page took 0.097034 seconds and 2 git commands to generate.