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