]> git.pld-linux.org Git - packages/python-pbr.git/blob - python-pbr.spec
- rebuild with python 3.8
[packages/python-pbr.git] / python-pbr.spec
1 #
2 # Conditional build:
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
8
9 %if %{with bootstrap}
10 %undefine       with_tests
11 %undefine       with_doc
12 %endif
13 %define         module  pbr
14 Summary:        Python Build Reasonableness
15 Summary(pl.UTF-8):      Python Build Reasonableness - rozsądne budowanie modułów pythonowych
16 Name:           python-%{module}
17 Version:        4.0.4
18 Release:        2
19 License:        Apache v2.0
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
27 %if %{with python2}
28 BuildRequires:  python-devel >= 1:2.7
29 %if %{with tests}
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
44 %endif
45 %endif
46 %if %{with python3}
47 BuildRequires:  python3-devel >= 1:3.3
48 %if %{with tests}
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
62 %endif
63 %endif
64 %if %{with doc}
65 BuildRequires:  python3-openstackdocstheme >= 1.18.1
66 BuildRequires:  sphinx-pdg-3 >= 1.6.2
67 %endif
68 BuildArch:      noarch
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 %description
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.
78
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.
86
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
91
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.
99
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.
107
108 %prep
109 %setup -q -n %{module}-%{version}
110
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}
114
115 # Remove bundled egg-info
116 %{__rm} -r %{module}.egg-info
117
118 %build
119 %if %{with python2}
120 %py_build %{?with_tests:test}
121
122 %{?with_tests:%{__rm} -r .testrepository}
123 %endif
124
125 %if %{with python3}
126 %py3_build %{?with_tests:test}
127
128 %{?with_tests:%{__rm} -r .testrepository}
129 %endif
130
131 %if %{with doc}
132 # generate html docs
133 sphinx-build-3 doc/source html
134 # remove the sphinx-build leftovers
135 %{__rm} -r html/{_sources,.doctrees,.buildinfo}
136 %endif
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %py_install
143
144 %py_postclean
145 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-2}
146 %endif
147
148 %if %{with python3}
149 %py3_install
150 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pbr{,-3}
151 %endif
152
153 %if %{with python2}
154 ln -sf pbr-2 $RPM_BUILD_ROOT%{_bindir}/pbr
155 %endif
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %if %{with python2}
161 %files
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}
168 %endif
169
170 %if %{with python3}
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}
177 %endif
This page took 0.084937 seconds and 3 git commands to generate.