3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # test target [fails on one wheel/wsgi test]
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
14 Summary: Python Build Reasonableness
15 Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
16 Name: python-%{module}
20 Group: Libraries/Python
21 #Source0Download: https://pypi.org/simple/pbr/
22 Source0: https://files.pythonhosted.org/packages/source/p/pbr/%{module}-%{version}.tar.gz
23 # Source0-md5: 000aac4d2bae0d8a9bc53b08634797c5
24 URL: https://launchpad.net/pbr
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
28 BuildRequires: python-devel >= 1:2.7
30 BuildRequires: python-coverage >= 4.0
31 BuildRequires: python-fixtures >= 3.0.0
32 BuildRequires: python-hacking >= 0.12.0
33 BuildRequires: python-hacking < 0.14
34 BuildRequires: python-mock >= 2.0
35 BuildRequires: python-reno >= 2.5.0
36 BuildRequires: python-six >= 1.10.0
37 BuildRequires: python-subunit >= 1.0.0
38 BuildRequires: python-testrepository >= 0.0.18
39 BuildRequires: python-testresources >= 2.0.0
40 BuildRequires: python-testscenarios >= 0.4
41 BuildRequires: python-testtools >= 2.2.0
42 BuildRequires: python-virtualenv >= 14.0.6
43 BuildRequires: python-wheel
47 BuildRequires: python3-devel >= 1:3.3
49 BuildRequires: python3-coverage >= 4.0
50 BuildRequires: python3-fixtures >= 3.0.0
51 BuildRequires: python3-hacking >= 0.12.0
52 BuildRequires: python3-hacking < 0.14
53 BuildRequires: python3-reno >= 2.5.0
54 BuildRequires: python3-six >= 1.10.0
55 BuildRequires: python3-subunit >= 1.0.0
56 BuildRequires: python3-testrepository >= 0.0.18
57 BuildRequires: python3-testresources >= 2.0.0
58 BuildRequires: python3-testscenarios >= 0.4
59 BuildRequires: python3-testtools >= 2.2.0
60 BuildRequires: python3-virtualenv >= 14.0.6
61 BuildRequires: python3-wheel
65 BuildRequires: python3-openstackdocstheme >= 1.18.1
66 BuildRequires: sphinx-pdg-3 >= 1.6.2
69 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 PBR is a library that injects some useful and sensible default
73 behaviors into your setuptools run. It started off life as the chunks
74 of code that were copied between all of the OpenStack projects. Around
75 the time that OpenStack hit 18 different projects each with at least 3
76 active branches, it seems like a good time to make that code into a
77 proper re-usable library.
79 %description -l pl.UTF-8
80 PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
81 domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
82 z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
83 Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
84 przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
85 wydzielenie kodu do biblioteki.
87 %package -n python3-pbr
88 Summary: Python Build Reasonableness
89 Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
90 Group: Libraries/Python
92 %description -n python3-pbr
93 PBR is a library that injects some useful and sensible default
94 behaviors into your setuptools run. It started off life as the chunks
95 of code that were copied between all of the OpenStack projects. Around
96 the time that OpenStack hit 18 different projects each with at least 3
97 active branches, it seems like a good time to make that code into a
98 proper re-usable library.
100 %description -n python3-pbr -l pl.UTF-8
101 PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
102 domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
103 z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
104 Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
105 przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
106 wydzielenie kodu do biblioteki.
109 %setup -q -n %{module}-%{version}
111 # Move away the requirements file so that pbr hooks don't add it
112 # to distutils requires_dist config
113 %{__mv} test-requirements.txt{,.disabled}
115 # Remove bundled egg-info
116 %{__rm} -r %{module}.egg-info
120 %py_build %{?with_tests:test}
122 %{?with_tests:%{__rm} -r .testrepository}
126 %py3_build %{?with_tests:test}
128 %{?with_tests:%{__rm} -r .testrepository}
133 sphinx-build-3 doc/source html
134 # remove the sphinx-build leftovers
135 %{__rm} -r html/{_sources,.doctrees,.buildinfo}
139 rm -rf $RPM_BUILD_ROOT
145 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-2}
150 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-3}
154 ln -sf pbr-2 $RPM_BUILD_ROOT%{_bindir}/pbr
158 rm -rf $RPM_BUILD_ROOT
162 %defattr(644,root,root,755)
163 %doc %{?with_doc:html} README.rst LICENSE
164 %attr(755,root,root) %{_bindir}/pbr
165 %attr(755,root,root) %{_bindir}/pbr-2
166 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
167 %{py_sitescriptdir}/%{module}
171 %files -n python3-pbr
172 %defattr(644,root,root,755)
173 %doc %{?with_doc:html} README.rst LICENSE
174 %attr(755,root,root) %{_bindir}/pbr-3
175 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
176 %{py3_sitescriptdir}/%{module}