[packages/flake8] - updated to 3.7.9 - added duplicate patch (fixes tests with python-flake8 already installed)

qboosh qboosh at pld-linux.org
Sun Jan 12 19:52:17 CET 2020


commit 2fc1c087be8b9ccec540ebe3b761e3bc0d7f3642
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jan 12 19:52:19 2020 +0100

    - updated to 3.7.9
    - added duplicate patch (fixes tests with python-flake8 already installed)

 flake8-duplicate.patch | 13 +++++++++++++
 flake8.spec            | 12 +++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/flake8.spec b/flake8.spec
index 9f46f95..b569748 100644
--- a/flake8.spec
+++ b/flake8.spec
@@ -8,20 +8,21 @@
 Summary:	The modular source code checker: pycodestyle, pyflakes and co
 Summary(pl.UTF-8):	Modularne narzędzie do sprawdzania kodu źródłowego: pycodestyle, pyflakes itp.
 Name:		flake8
-Version:	3.7.8
-Release:	2
+Version:	3.7.9
+Release:	1
 License:	MIT
 Group:		Development/Tools
 #Source0Download: https://pypi.org/simple/flake8/
 Source0:	https://files.pythonhosted.org/packages/source/f/flake8/%{name}-%{version}.tar.gz
-# Source0-md5:	147957dd7f8af16117ae5c3e6b82df74
+# Source0-md5:	7dc0ce36b6cf49b13b46bb37ddca80c5
 Patch0:		%{name}-req.patch
+Patch1:		%{name}-duplicate.patch
 URL:		https://gitlab.com/pycqa/flake8
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	rpm-pythonprov
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools >= 30
+BuildRequires:	python-setuptools >= 1:30
 %if %{with tests}
 BuildRequires:	python-configparser
 BuildRequires:	python-entrypoints >= 0.3
@@ -41,7 +42,7 @@ BuildRequires:	python-typing
 %endif
 %if %{with python3}
 BuildRequires:	python3-modules >= 1:3.4
-BuildRequires:	python3-setuptools >= 30
+BuildRequires:	python3-setuptools >= 1:30
 %if %{with tests}
 BuildRequires:	python3-entrypoints >= 0.3
 BuildRequires:	python3-entrypoints < 0.4
@@ -132,6 +133,7 @@ Dokumentacja API modułu Pythona flake8.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %if %{with python2}
diff --git a/flake8-duplicate.patch b/flake8-duplicate.patch
new file mode 100644
index 0000000..7df5eba
--- /dev/null
+++ b/flake8-duplicate.patch
@@ -0,0 +1,13 @@
+Don't register plugin if it's already registered; fixes tests with flake8 already installed.
+--- flake8-3.7.9/src/flake8/plugins/manager.py.orig	2020-01-12 19:41:12.510479228 +0100
++++ flake8-3.7.9/src/flake8/plugins/manager.py	2020-01-12 19:43:26.916417755 +0100
+@@ -268,6 +268,9 @@
+             Is this a repo-local plugin?
+         """
+         name = entry_point.name
++        if name in self.names:
++            LOG.warning('Skipping duplicate plugin "%s"' % name)
++            return
+         self.plugins[name] = Plugin(name, entry_point, local=local)
+         self.names.append(name)
+         LOG.debug('Loaded %r for plugin "%s".', self.plugins[name], name)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/flake8.git/commitdiff/2fc1c087be8b9ccec540ebe3b761e3bc0d7f3642



More information about the pld-cvs-commit mailing list