python-flake8/python-flake8.spec
Jan Matejek 8e0c1d341a - update for singlespec
- update to 3.3.0
  * fix setuptools integration
  * drop python 2.6 and python < 3.4 support
  * nonzero exit on problems
  * python 3.6 support
  * performance improvements
- switch requirement from pep8 to pycodestyle
- switch test runner from nose to pytest

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=26
2017-03-24 15:40:30 +00:00

91 lines
2.6 KiB
RPMSpec

#
# spec file for package python-flake8
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-flake8
Version: 3.3.0
Release: 0
Summary: Modular source code checker: pep8, pyflakes and co
License: MIT
Group: Development/Languages/Python
Url: https://gitlab.com/pycqa/flake8
Source: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module mccabe >= 0.2.1}
BuildRequires: %{python_module mock >= 2.0.0}
BuildRequires: %{python_module pycodestyle >= 2.0.0}
BuildRequires: %{python_module pyflakes >= 1.5.0}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: python2-configparser
BuildRequires: python2-enum34
# /SECTION
Requires: python-mccabe >= 0.2.1
Requires: python-pycodestyle >= 2.0.0
Requires: python-pyflakes >= 1.5.0
%ifpython2
Requires: python-configparser
Requires: python-enum34
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Flake8 is a wrapper around these tools:
- PyFlakes
- pep8
- Ned Batchelder's McCabe script
Flake8 runs all the tools by launching the single ``flake8`` script.
%prep
%setup -q -n flake8-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/flake8
%fdupes %{buildroot}%{_prefix}
%post
%python_install_alternative flake8
%postun
%python_uninstall_alternative flake8
%check
%python_exec setup.py test
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%python_alternative %{_bindir}/flake8
%{python_sitelib}/*
%changelog