3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without tests # do not perform "make test"
7 Summary: The modular source code checker: pycodestyle, pyflakes and co
8 Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
13 Group: Development/Tools
14 #Source0Download: https://pypi.python.org/simple/flake8/
15 Source0: https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
16 # Source0-md5: 3df622aac9bad27c04f34164609bbed8
17 Patch0: %{name}-mock.patch
18 URL: https://gitlab.com/pycqa/flake8
19 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: rpm-pythonprov
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-configparser
26 BuildRequires: python-enum34
27 BuildRequires: python-mccabe >= 0.6.0
28 BuildRequires: python-mccabe < 0.7.0
29 BuildRequires: python-mock >= 2.0.0
30 BuildRequires: python-pycodestyle >= 2.0.0
31 BuildRequires: python-pycodestyle < 2.4.0
32 BuildRequires: python-pyflakes >= 1.5.0
33 BuildRequires: python-pyflakes < 1.6.0
34 BuildRequires: python-pytest
35 BuildRequires: python-pytest-runner
39 BuildRequires: python3-modules >= 1:3.4
40 BuildRequires: python3-setuptools
42 BuildRequires: python3-mccabe >= 0.6.0
43 BuildRequires: python3-mccabe < 0.7.0
44 BuildRequires: python3-pycodestyle >= 2.0.0
45 BuildRequires: python3-pycodestyle < 2.4.0
46 BuildRequires: python3-pyflakes >= 1.5.0
47 BuildRequires: python3-pyflakes < 1.6.0
48 BuildRequires: python3-pytest
49 BuildRequires: python3-pytest-runner
50 BuildRequires: sed >= 4.0
54 Requires: python3-flake8 = %{version}-%{release}
56 Requires: python-flake8 = %{version}-%{release}
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 The modular source code checker. It is a wrapper around these tools:
65 - Ned Batchelder's McCabe script
67 %description -l pl.UTF-8
68 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
72 - skrypt McCabe autorstwa Neda Batcheldera
74 %package -n python-flake8
75 Summary: The modular source code checker: pycodestyle, pyflakes and co
76 Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
77 Group: Libraries/Python
78 Requires: python-modules >= 1:2.7
80 %description -n python-flake8
81 The modular source code checker. It is a wrapper around these tools:
84 - Ned Batchelder's McCabe script
86 %description -n python-flake8 -l pl.UTF-8
87 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
91 - skrypt McCabe autorstwa Neda Batcheldera
93 %package -n python3-flake8
94 Summary: The modular source code checker: pycodestyle, pyflakes and co
95 Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
96 Group: Libraries/Python
97 Requires: python3-modules >= 1:3.4
99 %description -n python3-flake8
100 The modular source code checker. It is a wrapper around these tools:
103 - Ned Batchelder's McCabe script
105 %description -n python3-flake8 -l pl.UTF-8
106 Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
110 - skrypt McCabe autorstwa Neda Batcheldera
118 %py_build %{?with_tests:test}
122 # don't require standalone mock
123 %{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
125 %py3_build %{?with_tests:test}
129 rm -rf $RPM_BUILD_ROOT
133 %{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
139 %{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
142 ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc CONTRIBUTORS.txt LICENSE README.rst
150 %attr(755,root,root) %{_bindir}/flake8
153 %files -n python-flake8
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_bindir}/flake8-2
156 %{py_sitescriptdir}/flake8
157 %{py_sitescriptdir}/flake8-%{version}-py*.egg-info
161 %files -n python3-flake8
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_bindir}/flake8-3
164 %{py3_sitescriptdir}/flake8
165 %{py3_sitescriptdir}/flake8-%{version}-py*.egg-info