]> git.pld-linux.org Git - packages/flake8.git/blob - flake8.spec
enable tests (tests bcond did not exist), update deps for tests
[packages/flake8.git] / flake8.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 Summary:        The modular source code checker: pep8, pyflakes and co
6 Name:           flake8
7 Version:        2.2.5
8 Release:        1
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
14 BuildRequires:  python3-modules
15 BuildRequires:  rpm-pythonprov
16 %if %{with tests}
17 BuildRequires:  python3-mccabe >= 0.2.1
18 BuildRequires:  python3-pep8 >= 1.5.7
19 BuildRequires:  python3-pyflakes >= 0.8.1
20 %endif
21 Requires:       python3-modules
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 The modular source code checker. It is a wrapper around these tools:
27 - PyFlakes
28 - pep8
29 - Ned Batchelder's McCabe script
30
31 %prep
32 %setup -q
33
34 %build
35 %{__python3} setup.py build %{?with_tests:test}
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 %{__python3} setup.py install \
40         --skip-build \
41         --optimize=2 \
42         --root=$RPM_BUILD_ROOT
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %files
48 %defattr(644,root,root,755)
49 %doc CHANGES.rst CONTRIBUTORS.txt README.rst
50 %attr(755,root,root) %{_bindir}/flake8
51 %{py3_sitescriptdir}/%{name}
52 %{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info
This page took 0.075871 seconds and 4 git commands to generate.