From 8e0c1d341a893677f334e46505ed0ba9de32664cbcf953beb230c366a56bc865 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 24 Mar 2017 15:40:30 +0000 Subject: [PATCH] - 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 --- flake8-2.5.1.tar.gz | 3 -- flake8-3.3.0.tar.gz | 3 ++ python-flake8.changes | 13 ++++++++ python-flake8.spec | 76 +++++++++++++++++++++---------------------- 4 files changed, 54 insertions(+), 41 deletions(-) delete mode 100644 flake8-2.5.1.tar.gz create mode 100644 flake8-3.3.0.tar.gz diff --git a/flake8-2.5.1.tar.gz b/flake8-2.5.1.tar.gz deleted file mode 100644 index be94229..0000000 --- a/flake8-2.5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:448aed48b0671fe6062f47b98c3081f3a4b36fbe99ddb8ac2a3be6e6cb135603 -size 83692 diff --git a/flake8-3.3.0.tar.gz b/flake8-3.3.0.tar.gz new file mode 100644 index 0000000..d0d1bcc --- /dev/null +++ b/flake8-3.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b907a26dcf5580753d8f80f1be0ec1d5c45b719f7bac441120793d1a70b03f12 +size 134345 diff --git a/python-flake8.changes b/python-flake8.changes index 53deca3..82cd786 100644 --- a/python-flake8.changes +++ b/python-flake8.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Mar 24 15:29:36 UTC 2017 - jmatejek@suse.com + +- 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 + ------------------------------------------------------------------- Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com diff --git a/python-flake8.spec b/python-flake8.spec index a3e95a5..6801b28 100644 --- a/python-flake8.spec +++ b/python-flake8.spec @@ -1,7 +1,7 @@ # # spec file for package python-flake8 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -16,33 +16,41 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-flake8 -Version: 2.5.1 +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: http://pypi.python.org/packages/source/f/flake8/flake8-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -# Test requirements: -BuildRequires: python-mccabe >= 0.2.1 -BuildRequires: python-mock -BuildRequires: python-nose -BuildRequires: python-pep8 >= 1.5.7 -BuildRequires: python-pyflakes >= 0.8.1 +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-pep8 >= 1.5.7 -Requires: python-pyflakes >= 0.8.1 -Requires(post): update-alternatives -Requires(preun): update-alternatives -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else -BuildArch: noarch +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: @@ -57,34 +65,26 @@ Flake8 runs all the tools by launching the single ``flake8`` script. %setup -q -n flake8-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} - -# Prepare for update-alternatives usage -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver} -ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8 +%python_install +%python_clone -a %{buildroot}%{_bindir}/flake8 +%fdupes %{buildroot}%{_prefix} %post -%_sbindir/update-alternatives \ - --install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30 +%python_install_alternative flake8 -%preun -if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove flake8 %{_bindir}/flake8-%{py_ver} -fi +%postun +%python_uninstall_alternative flake8 %check -python setup.py test +%python_exec setup.py test -%files +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/flake8 -%{_bindir}/flake8-%{py_ver} -%ghost %{_sysconfdir}/alternatives/flake8 +%python_alternative %{_bindir}/flake8 %{python_sitelib}/* %changelog