]> git.pld-linux.org Git - packages/flake8.git/blame - flake8.spec
- release 3 (by relup.sh)
[packages/flake8.git] / flake8.spec
CommitLineData
a24e9a34
ER
1#
2# Conditional build:
37b9d23d
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
a24e9a34
ER
5%bcond_without tests # do not perform "make test"
6
d7cb1ebf
JB
7Summary: The modular source code checker: pycodestyle, pyflakes and co
8Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
abcf879e 9Name: flake8
9bc90c26 10Version: 3.3.0
975a3e6b 11Release: 3
abcf879e
AM
12License: MIT
13Group: Development/Tools
37b9d23d 14#Source0Download: https://pypi.python.org/simple/flake8/
d7cb1ebf 15Source0: https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
9bc90c26 16# Source0-md5: 3df622aac9bad27c04f34164609bbed8
d7cb1ebf
JB
17Patch0: %{name}-mock.patch
18URL: https://gitlab.com/pycqa/flake8
37b9d23d 19BuildRequires: rpmbuild(macros) >= 1.714
abcf879e 20BuildRequires: rpm-pythonprov
37b9d23d 21%if %{with python2}
d7cb1ebf 22BuildRequires: python-modules >= 1:2.7
37b9d23d
JB
23BuildRequires: python-setuptools
24%if %{with tests}
9bc90c26 25BuildRequires: python-configparser
d7cb1ebf
JB
26BuildRequires: python-enum34
27BuildRequires: python-mccabe >= 0.6.0
28BuildRequires: python-mccabe < 0.7.0
972dfbb9 29BuildRequires: python-mock >= 2.0.0
53123676 30BuildRequires: python-pycodestyle >= 2.0.0
d7cb1ebf
JB
31BuildRequires: python-pycodestyle < 2.4.0
32BuildRequires: python-pyflakes >= 1.5.0
33BuildRequires: python-pyflakes < 1.6.0
34BuildRequires: python-pytest
35BuildRequires: python-pytest-runner
37b9d23d
JB
36%endif
37%endif
38%if %{with python3}
d7cb1ebf 39BuildRequires: python3-modules >= 1:3.4
37b9d23d 40BuildRequires: python3-setuptools
a24e9a34 41%if %{with tests}
d7cb1ebf
JB
42BuildRequires: python3-mccabe >= 0.6.0
43BuildRequires: python3-mccabe < 0.7.0
53123676 44BuildRequires: python3-pycodestyle >= 2.0.0
d7cb1ebf
JB
45BuildRequires: python3-pycodestyle < 2.4.0
46BuildRequires: python3-pyflakes >= 1.5.0
47BuildRequires: python3-pyflakes < 1.6.0
48BuildRequires: python3-pytest
49BuildRequires: python3-pytest-runner
50BuildRequires: sed >= 4.0
a24e9a34 51%endif
37b9d23d
JB
52%endif
53%if %{with python3}
54Requires: python3-flake8 = %{version}-%{release}
55%else
56Requires: python-flake8 = %{version}-%{release}
57%endif
abcf879e
AM
58BuildArch: noarch
59BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61%description
62The modular source code checker. It is a wrapper around these tools:
63- PyFlakes
d7cb1ebf 64- pycodestyle
abcf879e
AM
65- Ned Batchelder's McCabe script
66
37b9d23d
JB
67%description -l pl.UTF-8
68Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
69dla narzędzi:
70- PyFlakes
d7cb1ebf 71- pycodestyle
37b9d23d
JB
72- skrypt McCabe autorstwa Neda Batcheldera
73
74%package -n python-flake8
d7cb1ebf
JB
75Summary: The modular source code checker: pycodestyle, pyflakes and co
76Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 77Group: Libraries/Python
d7cb1ebf 78Requires: python-modules >= 1:2.7
37b9d23d
JB
79
80%description -n python-flake8
81The modular source code checker. It is a wrapper around these tools:
82- PyFlakes
d7cb1ebf 83- pycodestyle
37b9d23d
JB
84- Ned Batchelder's McCabe script
85
86%description -n python-flake8 -l pl.UTF-8
87Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
88dla narzędzi:
89- PyFlakes
d7cb1ebf 90- pycodestyle
37b9d23d
JB
91- skrypt McCabe autorstwa Neda Batcheldera
92
93%package -n python3-flake8
d7cb1ebf
JB
94Summary: The modular source code checker: pycodestyle, pyflakes and co
95Summary(pl.UTF-8): Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
37b9d23d 96Group: Libraries/Python
d7cb1ebf 97Requires: python3-modules >= 1:3.4
37b9d23d
JB
98
99%description -n python3-flake8
100The modular source code checker. It is a wrapper around these tools:
101- PyFlakes
d7cb1ebf 102- pycodestyle
37b9d23d
JB
103- Ned Batchelder's McCabe script
104
105%description -n python3-flake8 -l pl.UTF-8
106Modularne narzędzie do sprawdzania kodu źródłowego. Jest to opakowanie
107dla narzędzi:
108- PyFlakes
d7cb1ebf 109- pycodestyle
37b9d23d
JB
110- skrypt McCabe autorstwa Neda Batcheldera
111
abcf879e
AM
112%prep
113%setup -q
d7cb1ebf 114%patch0 -p1
abcf879e
AM
115
116%build
37b9d23d
JB
117%if %{with python2}
118%py_build %{?with_tests:test}
119%endif
120
121%if %{with python3}
d7cb1ebf
JB
122# don't require standalone mock
123%{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
124
33643bb9 125%py3_build %{?with_tests:test}
37b9d23d 126%endif
abcf879e
AM
127
128%install
129rm -rf $RPM_BUILD_ROOT
37b9d23d
JB
130
131%if %{with python2}
132%py_install
d7cb1ebf 133%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-2}
37b9d23d
JB
134%py_postclean
135%endif
136
137%if %{with python3}
33643bb9 138%py3_install
d7cb1ebf 139%{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
37b9d23d 140%endif
abcf879e 141
8b0b6706
ER
142ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
143
abcf879e
AM
144%clean
145rm -rf $RPM_BUILD_ROOT
146
147%files
148%defattr(644,root,root,755)
9bc90c26 149%doc CONTRIBUTORS.txt LICENSE README.rst
abcf879e 150%attr(755,root,root) %{_bindir}/flake8
37b9d23d
JB
151
152%if %{with python2}
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
158%endif
159
160%if %{with python3}
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
166%endif
This page took 0.085973 seconds and 4 git commands to generate.