- 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
This commit is contained in:
Jan Matejek 2017-03-24 15:40:30 +00:00 committed by Git OBS Bridge
parent 09603db66d
commit 8e0c1d341a
4 changed files with 54 additions and 41 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:448aed48b0671fe6062f47b98c3081f3a4b36fbe99ddb8ac2a3be6e6cb135603
size 83692

3
flake8-3.3.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b907a26dcf5580753d8f80f1be0ec1d5c45b719f7bac441120793d1a70b03f12
size 134345

View File

@ -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 Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-flake8 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,33 +16,41 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-flake8 Name: python-flake8
Version: 2.5.1 Version: 3.3.0
Release: 0 Release: 0
Summary: Modular source code checker: pep8, pyflakes and co Summary: Modular source code checker: pep8, pyflakes and co
License: MIT License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
Url: https://gitlab.com/pycqa/flake8 Url: https://gitlab.com/pycqa/flake8
Source: http://pypi.python.org/packages/source/f/flake8/flake8-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/f/flake8/flake8-%{version}.tar.gz
BuildRequires: python-devel BuildRequires: %{python_module devel}
BuildRequires: python-setuptools BuildRequires: %{python_module setuptools}
# Test requirements: BuildRequires: fdupes
BuildRequires: python-mccabe >= 0.2.1 BuildRequires: python-rpm-macros
BuildRequires: python-mock # SECTION test requirements
BuildRequires: python-nose BuildRequires: %{python_module mccabe >= 0.2.1}
BuildRequires: python-pep8 >= 1.5.7 BuildRequires: %{python_module mock >= 2.0.0}
BuildRequires: python-pyflakes >= 0.8.1 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-mccabe >= 0.2.1
Requires: python-pep8 >= 1.5.7 Requires: python-pycodestyle >= 2.0.0
Requires: python-pyflakes >= 0.8.1 Requires: python-pyflakes >= 1.5.0
Requires(post): update-alternatives %ifpython2
Requires(preun): update-alternatives Requires: python-configparser
BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: python-enum34
%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
%endif %endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description %description
Flake8 is a wrapper around these tools: 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} %setup -q -n flake8-%{version}
%build %build
python setup.py build %python_build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
%python_clone -a %{buildroot}%{_bindir}/flake8
# Prepare for update-alternatives usage %fdupes %{buildroot}%{_prefix}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8
%post %post
%_sbindir/update-alternatives \ %python_install_alternative flake8
--install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30
%preun %postun
if [ $1 -eq 0 ] ; then %python_uninstall_alternative flake8
%_sbindir/update-alternatives --remove flake8 %{_bindir}/flake8-%{py_ver}
fi
%check %check
python setup.py test %python_exec setup.py test
%files %files %{python_files}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE README.rst %doc LICENSE README.rst
%{_bindir}/flake8 %python_alternative %{_bindir}/flake8
%{_bindir}/flake8-%{py_ver}
%ghost %{_sysconfdir}/alternatives/flake8
%{python_sitelib}/* %{python_sitelib}/*
%changelog %changelog