]> git.pld-linux.org Git - packages/python-pbr.git/blame - python-pbr.spec
- test are possible now
[packages/python-pbr.git] / python-pbr.spec
CommitLineData
140ca651
ER
1#
2# Conditional build:
9f4131a8
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # test target
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
11%endif
140ca651
ER
12%define module pbr
13Summary: Python Build Reasonableness
d89984a8 14Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
140ca651 15Name: python-%{module}
d89984a8 16Version: 1.8.1
866add32 17Release: 2
140ca651
ER
18License: Apache v2.0
19Group: Libraries/Python
d89984a8
JB
20#Source0Download: https://pypi.python.org/pypi/pbr
21Source0: https://pypi.python.org/packages/source/p/pbr/%{module}-%{version}.tar.gz
22# Source0-md5: c8f9285e1a4ca6f9654c529b158baa3a
23URL: https://launchpad.net/pbr
140ca651 24BuildRequires: rpm-pythonprov
d89984a8 25BuildRequires: rpmbuild(macros) >= 1.714
8de31e80
ER
26%if %{with doc}
27BuildRequires: sphinx-pdg
28%endif
140ca651
ER
29%if %{with python2}
30# very new required, when also using tests
31BuildRequires: python-Sphinx >= 1.1.3
d89984a8 32BuildRequires: python-devel >= 1:2.6
140ca651 33%if %{with tests}
d89984a8 34# some still not packaged yet:
140ca651
ER
35BuildRequires: python-coverage >= 3.6
36BuildRequires: python-discover
d89984a8
JB
37BuildRequires: python-fixtures >= 1.3.1
38BuildRequires: python-hacking >= 0.10.0
39BuildRequires: python-hacking < 0.11
40BuildRequires: python-mock >= 1.2
41BuildRequires: python-six >= 1.9.0
42BuildRequires: python-subunit >= 0.0.18
140ca651 43BuildRequires: python-testrepository >= 0.0.18
d89984a8
JB
44BuildRequires: python-testresources >= 0.2.4
45BuildRequires: python-testscenarios >= 0.4
9f4131a8 46BuildRequires: python-testtools >= 1.1.0
d89984a8 47%endif
140ca651
ER
48%endif
49%if %{with python3}
d89984a8
JB
50BuildRequires: python3-devel >= 1:3.3
51%if %{with tests}
d89984a8
JB
52BuildRequires: python3-fixtures >= 1.3.1
53BuildRequires: python3-hacking >= 0.10.0
54BuildRequires: python3-hacking < 0.11
d89984a8
JB
55BuildRequires: python3-six >= 1.9.0
56BuildRequires: python3-subunit >= 0.0.18
57BuildRequires: python3-testrepository >= 0.0.18
58BuildRequires: python3-testresources >= 0.2.4
59BuildRequires: python3-testscenarios >= 0.4
9f4131a8 60BuildRequires: python3-testtools >= 1.1.0
d89984a8 61%endif
140ca651 62%endif
140ca651
ER
63BuildArch: noarch
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%description
67PBR is a library that injects some useful and sensible default
68behaviors into your setuptools run. It started off life as the chunks
69of code that were copied between all of the OpenStack projects. Around
70the time that OpenStack hit 18 different projects each with at least 3
71active branches, it seems like a good time to make that code into a
72proper re-usable library.
73
d89984a8
JB
74%description -l pl.UTF-8
75PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
76domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
77z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
78Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
79przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
80wydzielenie kodu do biblioteki.
81
140ca651
ER
82%package -n python3-pbr
83Summary: Python Build Reasonableness
d89984a8 84Summary(pl.UTF-8): Python Build Reasonableness - rozsądne budowanie modułów pythonowych
140ca651
ER
85Group: Libraries/Python
86
87%description -n python3-pbr
d89984a8
JB
88PBR is a library that injects some useful and sensible default
89behaviors into your setuptools run. It started off life as the chunks
90of code that were copied between all of the OpenStack projects. Around
91the time that OpenStack hit 18 different projects each with at least 3
92active branches, it seems like a good time to make that code into a
93proper re-usable library.
94
95%description -n python3-pbr -l pl.UTF-8
96PBR to biblioteka wstrzykująca trochę przydatnych i sensownych
97domyślnych zachowań przy uruchomieniu setuptools. Początki wywodzą się
98z fragmentów kodu kopiowanych między wszystkimi projektami OpenStacka.
99Kiedy OpenStack dorobił się 18 różnych projektów, z których każdy miał
100przynajmniej 3 aktywne gałęzie, uznano to za dobry moment na
101wydzielenie kodu do biblioteki.
140ca651
ER
102
103%prep
104%setup -q -n %{module}-%{version}
105
106# Remove the requirements file so that pbr hooks don't add it
d89984a8
JB
107# to distutils requires_dist config
108%{__rm} test-requirements.txt
140ca651
ER
109
110# Remove bundled egg-info
d89984a8 111%{__rm} -r %{module}.egg-info
140ca651
ER
112
113%build
114%if %{with python2}
2560be07 115%py_build %{?with_tests:test}
9f4131a8
JB
116
117%{?with_tests:%{__rm} -r .testrepository}
140ca651
ER
118%endif
119
120%if %{with python3}
2560be07 121%py3_build %{?with_tests:test}
9f4131a8
JB
122
123%{?with_tests:%{__rm} -r .testrepository}
140ca651
ER
124%endif
125
d89984a8 126%if %{with doc}
140ca651
ER
127# generate html docs
128sphinx-build doc/source html
129# remove the sphinx-build leftovers
d89984a8
JB
130%{__rm} -r html/{_sources,.doctrees,.buildinfo}
131%endif
140ca651
ER
132
133%install
134rm -rf $RPM_BUILD_ROOT
135%if %{with python2}
2560be07 136%py_install
140ca651
ER
137
138%py_postclean
d89984a8 139%{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-2}
140ca651
ER
140%endif
141
142%if %{with python3}
2560be07 143%py3_install
d89984a8 144%{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-3}
140ca651
ER
145%endif
146
9f4131a8 147%if %{with python2}
d89984a8 148ln -sf pbr-2 $RPM_BUILD_ROOT%{_bindir}/pbr
9f4131a8 149%endif
d89984a8 150
140ca651
ER
151%clean
152rm -rf $RPM_BUILD_ROOT
153
154%if %{with python2}
155%files
156%defattr(644,root,root,755)
d89984a8
JB
157%doc %{?with_doc:html} README.rst LICENSE
158%attr(755,root,root) %{_bindir}/pbr
159%attr(755,root,root) %{_bindir}/pbr-2
140ca651
ER
160%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
161%{py_sitescriptdir}/%{module}
162%endif
163
164%if %{with python3}
165%files -n python3-pbr
166%defattr(644,root,root,755)
d89984a8
JB
167%doc %{?with_doc:html} README.rst LICENSE
168%attr(755,root,root) %{_bindir}/pbr-3
140ca651
ER
169%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
170%{py3_sitescriptdir}/%{module}
171%endif
This page took 0.087957 seconds and 4 git commands to generate.