diff --git a/flake8-3.0.4-pytest.patch b/flake8-3.0.4-pytest.patch new file mode 100644 index 0000000..2d88d26 --- /dev/null +++ b/flake8-3.0.4-pytest.patch @@ -0,0 +1,21 @@ +diff -up flake8-3.0.4/pytest.ini~ flake8-3.0.4/pytest.ini +--- flake8-3.0.4/pytest.ini~ 2016-09-18 11:25:15.798280652 +0300 ++++ flake8-3.0.4/pytest.ini 2016-09-18 11:25:09.404122082 +0300 +@@ -0,0 +1,3 @@ ++[pytest] ++norecursedirs = .git .* *.egg* old docs dist build ++addopts = -rw +diff -up flake8-3.0.4/setup.cfg~ flake8-3.0.4/setup.cfg +--- flake8-3.0.4/setup.cfg~ 2016-08-08 13:37:09.000000000 +0300 ++++ flake8-3.0.4/setup.cfg 2016-09-18 11:25:01.606928717 +0300 +@@ -12,10 +12,6 @@ requires-dist = + pycodestyle >= 2.0.0, < 2.1.0 + mccabe >= 0.5.0, < 0.6.0 + +-[pytest] +-norecursedirs = .git .* *.egg* old docs dist build +-addopts = -rw +- + [egg_info] + tag_build = + tag_date = 0 diff --git a/python-flake8.spec b/python-flake8.spec index 4bdba5f..fd9db38 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -6,21 +6,27 @@ %global modname flake8 +%global pyflakes_dep >= 0.8.1 +%global pycodestyle_dep >= 2.0.0 +%global mccabe_dep >= 0.5.0 + Name: python-%{modname} -Version: 2.5.5 -Release: 2%{?dist} -Summary: Python code checking using pep8 and pyflakes +Version: 3.0.4 +Release: 1%{?dist} +Summary: Python code checking using pyflakes, pycodestyle, and mccabe License: MIT -URL: http://pypi.python.org/pypi/%{modname} +URL: https://gitlab.com/pycqa/flake8 Source0: https://files.pythonhosted.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz +# https://gitlab.com/pycqa/flake8/merge_requests/123 +Patch0: flake8-3.0.4-pytest.patch BuildArch: noarch %description -Flake8 is a wrapper around PyFlakes, pep8, and Ned's McCabe script. It -runs all the tools by launching the single flake8 script, and displays -the warnings in a per-file, merged output. +Flake8 is a wrapper around PyFlakes, pycodestyle, and Ned's McCabe +script. It runs all the tools by launching the single flake8 script, +and displays the warnings in a per-file, merged output. It also adds a few features: files that contain "# flake8: noqa" are skipped, lines that contain a "# noqa" comment at the end will not @@ -29,28 +35,32 @@ complexity checker is included, and it is extendable through flake8.extension entry points. %package -n python2-%{modname} -Summary: Python code checking using pep8 and pyflakes +Summary: Python code checking using pyflakes, pycodestyle, and mccabe Obsoletes: python-%{modname} < 2.5.1 %{?python_provide:%python_provide python2-%{modname}} -Requires: python-mccabe >= 0.2.1 -Requires: python-pep8 >= 1.5.7 -Requires: pyflakes >= 0.8.1 +Requires: python-mccabe %{mccabe_dep} +Requires: python2-pycodestyle %{pycodestyle_dep} +Requires: pyflakes %{pyflakes_dep} Requires: python-setuptools +Requires: python-enum34 +Requires: python-configparser BuildRequires: python2-devel -BuildRequires: python-nose BuildRequires: python-setuptools -BuildRequires: python-mccabe >= 0.2.1 -BuildRequires: python-pep8 >= 1.5.7 -BuildRequires: pyflakes >= 0.8.1 +BuildRequires: python-mccabe %{mccabe_dep} +BuildRequires: python2-pycodestyle %{pycodestyle_dep} +BuildRequires: pyflakes %{pyflakes_dep} BuildRequires: python-mock +BuildRequires: python-enum34 +BuildRequires: python-configparser +BuildRequires: python2-pytest %description -n python2-%{modname} -Flake8 is a wrapper around PyFlakes, pep8, and Ned's McCabe script. It -runs all the tools by launching the single flake8 script, and displays -the warnings in a per-file, merged output. +Flake8 is a wrapper around PyFlakes, pycodestyle, and Ned's McCabe +script. It runs all the tools by launching the single flake8 script, +and displays the warnings in a per-file, merged output. It also adds a few features: files that contain "# flake8: noqa" are skipped, lines that contain a "# noqa" comment at the end will not @@ -60,27 +70,27 @@ flake8.extension entry points. %if %{with python3} %package -n python3-%{modname} -Summary: Python code checking using pep8 and pyflakes +Summary: Python code checking using pyflakes, pycodestyle, and mccabe %{?python_provide:%python_provide python3-%{modname}} Requires: python3-setuptools -Requires: python3-mccabe >= 0.2.1 -Requires: python3-pep8 >= 1.5.7 -Requires: python3-pyflakes >= 0.6.1 +Requires: python3-mccabe %{mccabe_dep} +Requires: python3-pycodestyle %{pycodestyle_dep} +Requires: python3-pyflakes %{pyflakes_dep} BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-nose -BuildRequires: python3-mccabe >= 0.2.1 -BuildRequires: python3-pep8 >= 1.5.7 -BuildRequires: python3-pyflakes >= 0.8.1 +BuildRequires: python3-mccabe %{mccabe_dep} +BuildRequires: python3-pycodestyle %{pycodestyle_dep} +BuildRequires: python3-pyflakes %{pyflakes_dep} BuildRequires: python3-mock +BuildRequires: python3-pytest %description -n python3-%{modname} -Flake8 is a wrapper around PyFlakes, pep8, and Ned's McCabe script. It -runs all the tools by launching the single flake8 script, and displays -the warnings in a per-file, merged output. +Flake8 is a wrapper around PyFlakes, pycodestyle, and Ned's McCabe +script. It runs all the tools by launching the single flake8 script, +and displays the warnings in a per-file, merged output. It also adds a few features: files that contain "# flake8: noqa" are skipped, lines that contain a "# noqa" comment at the end will not @@ -93,14 +103,12 @@ This is version of the package running with Python 3. %prep -%setup -q -n %{modname}-%{version} - -# remove bundled egg-info -rm -r flake8.egg-info +%autosetup -n %{modname}-%{version} +touch tox.ini # https://gitlab.com/pycqa/flake8/merge_requests/123 # remove requirements from setup.py, handled by rpm. sed -i '/"pyflakes.*"/d' setup.py -sed -i '/"pep8.*"/d' setup.py +sed -i '/"pycodestyle.*"/d' setup.py sed -i '/"mccabe .*"/d' setup.py @@ -127,8 +135,8 @@ ln -s flake8-2 %{buildroot}%{_bindir}/flake8-%{python2_version} %check -%{__python2} setup.py nosetests --verbosity=2 -%{?with_python3:%{__python3} setup.py nosetests --verbosity=2} +%{__python2} setup.py test +%{?with_python3:%{__python3} setup.py test} %files -n python2-%{modname} @@ -150,7 +158,8 @@ ln -s flake8-2 %{buildroot}%{_bindir}/flake8-%{python2_version} %changelog -* Sat Sep 17 2016 Ville Skyttä +* Sat Sep 17 2016 Ville Skyttä - 3.0.4-1 +- Update to 3.0.4 - Add standard versioned names for executable * Tue Jul 19 2016 Fedora Release Engineering - 2.5.5-2 diff --git a/sources b/sources index 15b402c..e4a9072 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eb9ea3adf046f593bd21c93dfb527458 flake8-2.5.5.tar.gz +2b48e5ef1d21c687f10a66d44f1dda5c flake8-3.0.4.tar.gz