]>
Commit | Line | Data |
---|---|---|
a24e9a34 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
abcf879e AM |
5 | Summary: The modular source code checker: pep8, pyflakes and co |
6 | Name: flake8 | |
7 | Version: 2.2.5 | |
b6e3cac7 | 8 | Release: 2 |
abcf879e AM |
9 | License: MIT |
10 | Group: Development/Tools | |
11 | Source0: https://pypi.python.org/packages/source/f/flake8/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: 6dea927949b94c9d9495ab24bcdf9cf0 | |
13 | URL: https://pypi.python.org/pypi/flake8 | |
15a03bbe | 14 | BuildRequires: python3-distribute |
abcf879e AM |
15 | BuildRequires: python3-modules |
16 | BuildRequires: rpm-pythonprov | |
a24e9a34 ER |
17 | %if %{with tests} |
18 | BuildRequires: python3-mccabe >= 0.2.1 | |
15a03bbe | 19 | BuildRequires: python3-nose |
a24e9a34 ER |
20 | BuildRequires: python3-pep8 >= 1.5.7 |
21 | BuildRequires: python3-pyflakes >= 0.8.1 | |
22 | %endif | |
abcf879e AM |
23 | Requires: python3-modules |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | The modular source code checker. It is a wrapper around these tools: | |
29 | - PyFlakes | |
30 | - pep8 | |
31 | - Ned Batchelder's McCabe script | |
32 | ||
33 | %prep | |
34 | %setup -q | |
35 | ||
36 | %build | |
a24e9a34 | 37 | %{__python3} setup.py build %{?with_tests:test} |
abcf879e AM |
38 | |
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
a24e9a34 ER |
41 | %{__python3} setup.py install \ |
42 | --skip-build \ | |
43 | --optimize=2 \ | |
44 | --root=$RPM_BUILD_ROOT | |
abcf879e AM |
45 | |
46 | %clean | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %files | |
50 | %defattr(644,root,root,755) | |
51 | %doc CHANGES.rst CONTRIBUTORS.txt README.rst | |
52 | %attr(755,root,root) %{_bindir}/flake8 | |
53 | %{py3_sitescriptdir}/%{name} | |
54 | %{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info |