2013-04-23 14:59:44 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-flake8
|
|
|
|
#
|
2018-01-11 13:13:07 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-04-23 14:59:44 +02:00
|
|
|
#
|
|
|
|
# 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/
|
2013-06-17 14:51:08 +02:00
|
|
|
#
|
2013-04-23 14:59:44 +02:00
|
|
|
|
|
|
|
|
2017-03-24 16:40:30 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-08-08 23:44:53 +02:00
|
|
|
%bcond_without python2
|
2013-04-23 14:59:44 +02:00
|
|
|
Name: python-flake8
|
2017-10-24 11:00:38 +02:00
|
|
|
Version: 3.5.0
|
2013-04-23 14:59:44 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Modular source code checker: pep8, pyflakes and co
|
2013-06-17 14:51:08 +02:00
|
|
|
License: MIT
|
2013-04-23 14:59:44 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-08-08 23:44:53 +02:00
|
|
|
URL: https://gitlab.com/pycqa/flake8
|
2017-03-24 16:40:30 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz
|
2018-04-15 15:59:22 +02:00
|
|
|
#PATCH-FIX-UPSTREAM fix_pycodestyle_240.patch
|
|
|
|
Patch0: fix_pycodestyle_240.patch
|
2018-08-08 23:44:53 +02:00
|
|
|
Patch1: python-flake8-3.5.0-pyflakes-2.0.0.patch
|
2018-09-06 00:21:58 +02:00
|
|
|
Patch2: remove_mock_dependency.patch
|
2017-03-24 16:40:30 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-08-08 23:44:53 +02:00
|
|
|
Requires: python-mccabe >= 0.6.0
|
|
|
|
Requires: python-pycodestyle >= 2.4.0
|
|
|
|
Requires: python-pyflakes >= 2.0.0
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
BuildArch: noarch
|
2017-03-24 16:40:30 +01:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module mccabe >= 0.2.1}
|
2018-08-08 23:44:53 +02:00
|
|
|
BuildRequires: %{python_module pycodestyle >= 2.4.0}
|
|
|
|
BuildRequires: %{python_module pyflakes >= 2.0.0}
|
2017-03-24 16:40:30 +01:00
|
|
|
BuildRequires: %{python_module pytest-runner}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2018-01-11 13:13:07 +01:00
|
|
|
%if %{with python2}
|
2017-03-24 16:40:30 +01:00
|
|
|
BuildRequires: python2-configparser
|
|
|
|
BuildRequires: python2-enum34
|
2018-09-06 00:21:58 +02:00
|
|
|
BuildRequires: python2-mock
|
2018-01-11 13:13:07 +01:00
|
|
|
%endif
|
2017-03-24 16:40:30 +01:00
|
|
|
# /SECTION
|
|
|
|
%ifpython2
|
|
|
|
Requires: python-configparser
|
|
|
|
Requires: python-enum34
|
|
|
|
%endif
|
|
|
|
%python_subpackages
|
2013-04-23 14:59:44 +02:00
|
|
|
|
|
|
|
%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}
|
2018-08-08 23:44:53 +02:00
|
|
|
%autopatch -p1
|
2013-04-23 14:59:44 +02:00
|
|
|
|
|
|
|
%build
|
2017-03-24 16:40:30 +01:00
|
|
|
%python_build
|
2013-04-23 14:59:44 +02:00
|
|
|
|
|
|
|
%install
|
2017-03-24 16:40:30 +01:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/flake8
|
2018-08-08 23:44:53 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2016-01-13 10:39:35 +01:00
|
|
|
|
|
|
|
%post
|
2017-03-24 16:40:30 +01:00
|
|
|
%python_install_alternative flake8
|
2016-01-13 10:39:35 +01:00
|
|
|
|
2017-03-24 16:40:30 +01:00
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative flake8
|
2016-01-13 10:39:35 +01:00
|
|
|
|
2013-04-24 11:04:57 +02:00
|
|
|
%check
|
2017-03-24 16:40:30 +01:00
|
|
|
%python_exec setup.py test
|
2013-04-24 11:04:57 +02:00
|
|
|
|
2017-03-24 16:40:30 +01:00
|
|
|
%files %{python_files}
|
2018-04-15 15:59:22 +02:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2017-03-24 16:40:30 +01:00
|
|
|
%python_alternative %{_bindir}/flake8
|
2013-04-23 14:59:44 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|