]> git.pld-linux.org Git - packages/python-hacking.git/blame - python-hacking.spec
rebuild with python 3.10
[packages/python-hacking.git] / python-hacking.spec
CommitLineData
b6cc28e3
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
0e5aaef6 5%bcond_with tests # test target (broken)
b6cc28e3
JB
6
7Summary: OpenStack Hacking Guideline enforcement plugins
8Summary(pl.UTF-8): Wtyczki wymuszające OpenStack Hacking Guideline
9Name: python-hacking
0e5aaef6 10Version: 0.10.3
64bec2ff 11Release: 7
b6cc28e3
JB
12License: Apache v2.0
13Group: Development/Languages/Python
0e5aaef6
JK
14Source0: https://github.com/openstack-dev/hacking/archive/%{version}/hacking-%{version}.tar.gz
15# Source0-md5: 1a3881ee56e7fa20b2ed019a84738168
b6cc28e3
JB
16Patch0: %{name}-requirements.patch
17URL: https://github.com/openstack-dev/hacking
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.6
22BuildRequires: python-pbr >= 0.11
b6cc28e3
JB
23%if %{with tests}
24BuildRequires: python-Sphinx >= 1.1.2
25BuildRequires: python-coverage >= 3.6
26BuildRequires: python-discover
27BuildRequires: python-eventlet >= 0.16.1
28BuildRequires: python-fixtures >= 0.3.14
29BuildRequires: python-flake8 >= 2.2.4
30BuildRequires: python-mccabe >= 0.2.1
31BuildRequires: python-mock >= 1.0
32BuildRequires: python-oslosphinx >= 2.2.0
33BuildRequires: python-pep8 >= 1.5.7
34BuildRequires: python-pyflakes >= 0.8.1
35BuildRequires: python-six >= 1.7.0
36BuildRequires: python-subunit >= 0.0.18
37BuildRequires: python-testrepository >= 0.0.18
38BuildRequires: python-testscenarios >= 0.4
39BuildRequires: python-testtools >= 0.9.36
40%endif
41%endif
42%if %{with python3}
43BuildRequires: python3-devel >= 1:3.3
44BuildRequires: python3-pbr >= 0.11
b6cc28e3
JB
45%if %{with tests}
46BuildRequires: python3-Sphinx >= 1.1.2
47BuildRequires: python3-eventlet >= 0.16.1
48BuildRequires: python3-fixtures >= 0.3.14
49BuildRequires: python3-flake8 >= 2.2.4
50BuildRequires: python3-mccabe >= 0.2.1
51BuildRequires: python3-pep8 >= 1.5.7
52BuildRequires: python3-pyflakes >= 0.8.1
53BuildRequires: python3-six >= 1.7.0
54BuildRequires: python3-subunit >= 0.0.18
55BuildRequires: python3-testrepository >= 0.0.18
56BuildRequires: python3-testscenarios >= 0.4
57BuildRequires: python3-testtools >= 0.9.36
58%endif
59%endif
60Requires: python-flake8 >= 2.2.4
61Requires: python-mccabe >= 0.2.1
62Requires: python-modules >= 1:2.6
63Requires: python-pep8 >= 1.5.7
64Requires: python-six >= 1.7.0
32533938 65BuildArch: noarch
b6cc28e3
JB
66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68%description
69hacking is a set of flake8 plugins that test and enforce the OpenStack
70Style Guidlines <http://docs.openstack.org/developer/hacking>.
71
72%description -l pl.UTF-8
73Moduł hacking to zbiór wtyczek dla narzędzia flake8, testujących i
74wymuszających przestrzeganie wskazówek OpenStack Style Guidlines
75<http://docs.openstack.org/developer/hacking>.
76
77%package -n python3-hacking
78Summary: OpenStack Hacking Guideline enforcement plugins
79Summary(pl.UTF-8): Wtyczki wymuszające OpenStack Hacking Guideline
80Group: Development/Languages/Python
81Requires: python3-flake8 >= 2.2.4
82Requires: python3-mccabe >= 0.2.1
83Requires: python3-modules >= 1:3.2
84Requires: python3-pep8 >= 1.5.7
85Requires: python3-six >= 1.7.0
86
87%description -n python3-hacking
88hacking is a set of flake8 plugins that test and enforce the OpenStack
89Style Guidlines <http://docs.openstack.org/developer/hacking>.
90
91%description -n python3-hacking -l pl.UTF-8
92Moduł hacking to zbiór wtyczek dla narzędzia flake8, testujących i
93wymuszających przestrzeganie wskazówek OpenStack Style Guidlines
94<http://docs.openstack.org/developer/hacking>.
95
96%prep
97%setup -q -n hacking-%{version}
98%patch0 -p1
99
100%build
0e5aaef6 101export PBR_VERSION="%{version}"
b6cc28e3
JB
102%if %{with python2}
103%py_build %{?with_tests:test}
104
105%{?with_tests:%{__rm} -r .testrepository}
106%endif
107
108%if %{with python3}
109%py3_build %{?with_tests:test}
110
111%{?with_tests:%{__rm} -r .testrepository}
112%endif
113
114%install
115rm -rf $RPM_BUILD_ROOT
116
0e5aaef6
JK
117export PBR_VERSION="%{version}"
118
b6cc28e3
JB
119%if %{with python2}
120%py_install
121
122%py_postclean
123%endif
124
125%if %{with python3}
126%py3_install
127%endif
128
129%clean
130rm -rf $RPM_BUILD_ROOT
131
132%if %{with python2}
133%files
134%defattr(644,root,root,755)
0e5aaef6 135%doc README.rst
b6cc28e3
JB
136%{py_sitescriptdir}/hacking
137%{py_sitescriptdir}/hacking-%{version}-py*.egg-info
138%endif
139
140%if %{with python3}
141%files -n python3-hacking
142%defattr(644,root,root,755)
0e5aaef6 143%doc README.rst
b6cc28e3
JB
144%{py3_sitescriptdir}/hacking
145%{py3_sitescriptdir}/hacking-%{version}-py*.egg-info
146%endif
This page took 0.099889 seconds and 4 git commands to generate.