]> git.pld-linux.org Git - packages/flake8.git/blob - flake8.spec
- updated to 3.7.8
[packages/flake8.git] / flake8.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # pytest tests
6 %bcond_without  doc     # Sphinx documentation
7
8 Summary:        The modular source code checker: pycodestyle, pyflakes and co
9 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
10 Name:           flake8
11 Version:        3.7.8
12 Release:        1
13 License:        MIT
14 Group:          Development/Tools
15 #Source0Download: https://pypi.org/simple/flake8/
16 Source0:        https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
17 # Source0-md5:  147957dd7f8af16117ae5c3e6b82df74
18 URL:            https://gitlab.com/pycqa/flake8
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 BuildRequires:  rpm-pythonprov
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools >= 30
24 %if %{with tests}
25 BuildRequires:  python-configparser
26 BuildRequires:  python-entrypoints >= 0.3
27 BuildRequires:  python-entrypoints < 0.4
28 BuildRequires:  python-enum34
29 BuildRequires:  python-functools32
30 BuildRequires:  python-mccabe >= 0.6.0
31 BuildRequires:  python-mccabe < 0.7.0
32 BuildRequires:  python-mock >= 2.0.0
33 BuildRequires:  python-pycodestyle >= 2.5.0
34 BuildRequires:  python-pycodestyle < 2.6.0
35 BuildRequires:  python-pyflakes >= 2.1.0
36 BuildRequires:  python-pyflakes < 2.2.0
37 BuildRequires:  python-pytest
38 BuildRequires:  python-typing
39 %endif
40 %endif
41 %if %{with python3}
42 BuildRequires:  python3-modules >= 1:3.4
43 BuildRequires:  python3-setuptools >= 30
44 %if %{with tests}
45 BuildRequires:  python3-entrypoints >= 0.3
46 BuildRequires:  python3-entrypoints < 0.4
47 BuildRequires:  python3-mccabe >= 0.6.0
48 BuildRequires:  python3-mccabe < 0.7.0
49 BuildRequires:  python3-pycodestyle >= 2.5.0
50 BuildRequires:  python3-pycodestyle < 2.6.0
51 BuildRequires:  python3-pyflakes >= 2.1.0
52 BuildRequires:  python3-pyflakes < 2.2.0
53 BuildRequires:  python3-pytest
54 BuildRequires:  sed >= 4.0
55 %endif
56 %endif
57 %if %{with doc}
58 BuildRequires:  python3-sphinx-prompt
59 BuildRequires:  sphinx-pdg-3 >= 1.3
60 %endif
61 %if %{with python3}
62 Requires:       python3-flake8 = %{version}-%{release}
63 %else
64 Requires:       python-flake8 = %{version}-%{release}
65 %endif
66 BuildArch:      noarch
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %description
70 The modular source code checker. It is a wrapper around these tools:
71 - PyFlakes
72 - pycodestyle
73 - Ned Batchelder's McCabe script
74
75 %description -l pl.UTF-8
76 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
77 dla narzędzi:
78 - PyFlakes
79 - pycodestyle
80 - skrypt McCabe autorstwa Neda Batcheldera
81
82 %package -n python-flake8
83 Summary:        The modular source code checker: pycodestyle, pyflakes and co
84 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
85 Group:          Libraries/Python
86 Requires:       python-modules >= 1:2.7
87
88 %description -n python-flake8
89 The modular source code checker. It is a wrapper around these tools:
90 - PyFlakes
91 - pycodestyle
92 - Ned Batchelder's McCabe script
93
94 %description -n python-flake8 -l pl.UTF-8
95 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
96 dla narzędzi:
97 - PyFlakes
98 - pycodestyle
99 - skrypt McCabe autorstwa Neda Batcheldera
100
101 %package -n python3-flake8
102 Summary:        The modular source code checker: pycodestyle, pyflakes and co
103 Summary(pl.UTF-8):      Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
104 Group:          Libraries/Python
105 Requires:       python3-modules >= 1:3.4
106
107 %description -n python3-flake8
108 The modular source code checker. It is a wrapper around these tools:
109 - PyFlakes
110 - pycodestyle
111 - Ned Batchelder's McCabe script
112
113 %description -n python3-flake8 -l pl.UTF-8
114 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
115 dla narzędzi:
116 - PyFlakes
117 - pycodestyle
118 - skrypt McCabe autorstwa Neda Batcheldera
119
120 %package -n python-flake8-apidocs
121 Summary:        API documentation for Python flake8 module
122 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona flake8
123 Group:          Documentation
124
125 %description -n python-flake8-apidocs
126 API documentation for Python flake8 module.
127
128 %description -n python-flake8-apidocs -l pl.UTF-8
129 Dokumentacja API modułu Pythona flake8.
130
131 %prep
132 %setup -q
133
134 %build
135 %if %{with python2}
136 %py_build
137
138 %if %{with tests}
139 PYTHONPATH=$(pwd)/src \
140 %{__python} -m pytest -rw tests
141 %endif
142 %endif
143
144 %if %{with python3}
145 # don't require standalone mock
146 %{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
147
148 %py3_build
149
150 %if %{with tests}
151 PYTHONPATH=$(pwd)/src \
152 %{__python3} -m pytest -rw tests
153 %endif
154 %endif
155
156 %if %{with doc}
157 cd docs/source
158 PYTHONPATH=$(pwd)/../../src \
159 sphinx-build-3 -b html . _build/html
160 %endif
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164
165 %if %{with python2}
166 %py_install
167 %{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
168 %py_postclean
169 %endif
170
171 %if %{with python3}
172 %py3_install
173 %{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
174 %endif
175
176 ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
177
178 %clean
179 rm -rf $RPM_BUILD_ROOT
180
181 %files
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{_bindir}/flake8
184
185 %if %{with python2}
186 %files -n python-flake8
187 %defattr(644,root,root,755)
188 %doc CONTRIBUTORS.txt LICENSE README.rst
189 %attr(755,root,root) %{_bindir}/flake8-2
190 %{py_sitescriptdir}/flake8
191 %{py_sitescriptdir}/flake8-%{version}-py*.egg-info
192 %endif
193
194 %if %{with python3}
195 %files -n python3-flake8
196 %defattr(644,root,root,755)
197 %doc CONTRIBUTORS.txt LICENSE README.rst
198 %attr(755,root,root) %{_bindir}/flake8-3
199 %{py3_sitescriptdir}/flake8
200 %{py3_sitescriptdir}/flake8-%{version}-py*.egg-info
201 %endif
202
203 %if %{with doc}
204 %files -n python-flake8-apidocs
205 %defattr(644,root,root,755)
206 %doc docs/source/_build/html/{_modules,_static,internal,plugin-development,release-notes,user,*.html,*.js}
207 %endif
This page took 0.075183 seconds and 4 git commands to generate.