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