]> git.pld-linux.org Git - packages/python-pbr.git/blame - python-pbr.spec
- updated to 5.8.1
[packages/python-pbr.git] / python-pbr.spec
CommitLineData
140ca651
ER
1#
2# Conditional build:
9f4131a8 3%bcond_without doc # Sphinx documentation
6255cbf2 4%bcond_with tests # test target [fails on one wheel/wsgi test]
9f4131a8
JB
5%bcond_with bootstrap # disable tests for bootstrap (circular build dependencies)
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
9%if %{with bootstrap}
10%undefine with_tests
9264f4e6 11%undefine with_doc
9f4131a8 12%endif
140ca651
ER
13%define module pbr
14Summary: Python Build Reasonableness
d89984a8 15Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
140ca651 16Name: python-%{module}
5b8de432
JB
17Version: 5.8.1
18Release: 1
140ca651
ER
19License: Apache v2.0
20Group: Libraries/Python
9264f4e6
JB
21#Source0Download: https://pypi.org/simple/pbr/
22Source0: https://files.pythonhosted.org/packages/source/p/pbr/%{module}-%{version}.tar.gz
5b8de432 23# Source0-md5: 9ab99a85202af94990ef44ebcd2bf196
d89984a8 24URL: https://launchpad.net/pbr
140ca651 25BuildRequires: rpm-pythonprov
d89984a8 26BuildRequires: rpmbuild(macros) >= 1.714
140ca651 27%if %{with python2}
9264f4e6 28BuildRequires: python-devel >= 1:2.7
140ca651 29%if %{with tests}
9264f4e6
JB
30BuildRequires: python-coverage >= 4.0
31BuildRequires: python-fixtures >= 3.0.0
a62517a0 32BuildRequires: python-mock >= 2.0.0
9264f4e6 33BuildRequires: python-reno >= 2.5.0
5b8de432 34BuildRequires: python-six >= 1.12.0
a62517a0 35BuildRequires: python-stestr >= 2.1.0
140ca651 36BuildRequires: python-testrepository >= 0.0.18
9264f4e6 37BuildRequires: python-testresources >= 2.0.0
d89984a8 38BuildRequires: python-testscenarios >= 0.4
9264f4e6 39BuildRequires: python-testtools >= 2.2.0
5b8de432 40BuildRequires: python-virtualenv >= 20.0.3
a62517a0 41BuildRequires: python-wheel >= 0.32.0
d89984a8 42%endif
140ca651
ER
43%endif
44%if %{with python3}
a62517a0 45BuildRequires: python3-devel >= 1:3.5
d89984a8 46%if %{with tests}
9264f4e6
JB
47BuildRequires: python3-coverage >= 4.0
48BuildRequires: python3-fixtures >= 3.0.0
5b8de432 49%if "%{py3_ver}" >= "3.6"
a62517a0 50BuildRequires: python3-hacking >= 1.1.0
5b8de432
JB
51BuildRequires: python3-hacking < 4.0.0
52%endif
9264f4e6 53BuildRequires: python3-reno >= 2.5.0
5b8de432 54BuildRequires: python3-six >= 1.12.0
a62517a0 55BuildRequires: python3-stestr >= 2.1.0
d89984a8 56BuildRequires: python3-testrepository >= 0.0.18
9264f4e6 57BuildRequires: python3-testresources >= 2.0.0
d89984a8 58BuildRequires: python3-testscenarios >= 0.4
9264f4e6 59BuildRequires: python3-testtools >= 2.2.0
5b8de432 60BuildRequires: python3-virtualenv >= 20.0.3
a62517a0 61BuildRequires: python3-wheel >= 0.32.0
d89984a8 62%endif
140ca651 63%endif
9264f4e6
JB
64%if %{with doc}
65BuildRequires: python3-openstackdocstheme >= 1.18.1
a62517a0 66BuildRequires: python3-reno >= 2.5.0
5b8de432 67BuildRequires: python3-six >= 1.12.0
a62517a0 68BuildRequires: python3-sphinxcontrib-apidoc >= 0.2.0
9264f4e6
JB
69BuildRequires: sphinx-pdg-3 >= 1.6.2
70%endif
a62517a0 71Requires: python-modules >= 1:2.7
140ca651
ER
72BuildArch: noarch
73BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75%description
76PBR is a library that injects some useful and sensible default
77behaviors into your setuptools run. It started off life as the chunks
78of code that were copied between all of the OpenStack projects. Around
79the time that OpenStack hit 18 different projects each with at least 3
80active branches, it seems like a good time to make that code into a
81proper re-usable library.
82
d89984a8
JB
83%description -l pl.UTF-8
84PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
85domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
86z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
87Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
88przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
89wydzielenie kodu do biblioteki.
90
140ca651
ER
91%package -n python3-pbr
92Summary: Python Build Reasonableness
d89984a8 93Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
140ca651 94Group: Libraries/Python
a62517a0 95Requires: python3-modules >= 1:3.5
5b8de432 96Conflicts: python-pbr < 5.8.1
140ca651
ER
97
98%description -n python3-pbr
d89984a8
JB
99PBR is a library that injects some useful and sensible default
100behaviors into your setuptools run. It started off life as the chunks
101of code that were copied between all of the OpenStack projects. Around
102the time that OpenStack hit 18 different projects each with at least 3
103active branches, it seems like a good time to make that code into a
104proper re-usable library.
105
106%description -n python3-pbr -l pl.UTF-8
107PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
108domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
109z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
110Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
111przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
112wydzielenie kodu do biblioteki.
140ca651 113
a62517a0
JB
114%package doc
115Summary: Documentation for Python pbr package
116Summary(pl.UTF-8): Dokumentacja do pakietu Pythona pbr
117Group: Documentation
118
119%description doc
120Documentation for Python pbr package (both user and API
121documentation).
122
123%description doc -l pl.UTF-8
124Dokumentacja do pakietu Pythona pbr (zarówno dokumentacja użytkownika,
125jak i API).
126
140ca651
ER
127%prep
128%setup -q -n %{module}-%{version}
129
6255cbf2 130# Move away the requirements file so that pbr hooks don't add it
d89984a8 131# to distutils requires_dist config
6255cbf2 132%{__mv} test-requirements.txt{,.disabled}
140ca651
ER
133
134# Remove bundled egg-info
d89984a8 135%{__rm} -r %{module}.egg-info
140ca651
ER
136
137%build
138%if %{with python2}
2560be07 139%py_build %{?with_tests:test}
9f4131a8
JB
140
141%{?with_tests:%{__rm} -r .testrepository}
140ca651
ER
142%endif
143
144%if %{with python3}
2560be07 145%py3_build %{?with_tests:test}
9f4131a8
JB
146
147%{?with_tests:%{__rm} -r .testrepository}
140ca651
ER
148%endif
149
d89984a8 150%if %{with doc}
140ca651 151# generate html docs
9264f4e6 152sphinx-build-3 doc/source html
140ca651 153# remove the sphinx-build leftovers
d89984a8
JB
154%{__rm} -r html/{_sources,.doctrees,.buildinfo}
155%endif
140ca651
ER
156
157%install
158rm -rf $RPM_BUILD_ROOT
9264f4e6 159
140ca651 160%if %{with python2}
2560be07 161%py_install
140ca651
ER
162
163%py_postclean
d89984a8 164%{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-2}
140ca651
ER
165%endif
166
167%if %{with python3}
2560be07 168%py3_install
d89984a8 169%{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-3}
140ca651
ER
170%endif
171
9f4131a8 172%if %{with python2}
d89984a8 173ln -sf pbr-2 $RPM_BUILD_ROOT%{_bindir}/pbr
9f4131a8 174%endif
d89984a8 175
140ca651
ER
176%clean
177rm -rf $RPM_BUILD_ROOT
178
179%if %{with python2}
180%files
181%defattr(644,root,root,755)
5b8de432 182%doc AUTHORS ChangeLog LICENSE README.rst
d89984a8 183%attr(755,root,root) %{_bindir}/pbr-2
140ca651
ER
184%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
185%{py_sitescriptdir}/%{module}
186%endif
187
188%if %{with python3}
189%files -n python3-pbr
190%defattr(644,root,root,755)
5b8de432
JB
191%doc AUTHORS ChangeLog LICENSE README.rst
192%attr(755,root,root) %{_bindir}/pbr
d89984a8 193%attr(755,root,root) %{_bindir}/pbr-3
140ca651
ER
194%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
195%{py3_sitescriptdir}/%{module}
196%endif
a62517a0
JB
197
198%if %{with doc}
199%files doc
200%defattr(644,root,root,755)
201%doc html/*
202%endif
This page took 0.183389 seconds and 4 git commands to generate.