[packages/flake8] - updated to 3.7.8 - removed outdated mock patch

qboosh qboosh at pld-linux.org
Tue Oct 22 22:01:23 CEST 2019


commit 182038705195fb5209e23e0bbc64f935722e43e3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Oct 22 22:04:55 2019 +0200

    - updated to 3.7.8
    - removed outdated mock patch

 flake8-mock.patch | 13 -------------
 flake8.spec       | 51 +++++++++++++++++++++++++++++----------------------
 2 files changed, 29 insertions(+), 35 deletions(-)
---
diff --git a/flake8.spec b/flake8.spec
index db39321..6bcfc96 100644
--- a/flake8.spec
+++ b/flake8.spec
@@ -8,14 +8,13 @@
 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.5.0
+Version:	3.7.8
 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:	7e5fe39d578a2c2d0962b61b35b8c3fc
-Patch0:		%{name}-mock.patch
+# Source0-md5:	147957dd7f8af16117ae5c3e6b82df74
 URL:		https://gitlab.com/pycqa/flake8
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	rpm-pythonprov
@@ -24,36 +23,40 @@ BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools >= 30
 %if %{with tests}
 BuildRequires:	python-configparser
+BuildRequires:	python-entrypoints >= 0.3
+BuildRequires:	python-entrypoints < 0.4
 BuildRequires:	python-enum34
+BuildRequires:	python-functools32
 BuildRequires:	python-mccabe >= 0.6.0
 BuildRequires:	python-mccabe < 0.7.0
 BuildRequires:	python-mock >= 2.0.0
-BuildRequires:	python-pycodestyle >= 2.0.0
-BuildRequires:	python-pycodestyle < 2.4.0
-BuildRequires:	python-pyflakes >= 1.5.0
-BuildRequires:	python-pyflakes < 1.7.0
+BuildRequires:	python-pycodestyle >= 2.5.0
+BuildRequires:	python-pycodestyle < 2.6.0
+BuildRequires:	python-pyflakes >= 2.1.0
+BuildRequires:	python-pyflakes < 2.2.0
 BuildRequires:	python-pytest
-BuildRequires:	python-pytest-runner
+BuildRequires:	python-typing
 %endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-modules >= 1:3.4
 BuildRequires:	python3-setuptools >= 30
 %if %{with tests}
+BuildRequires:	python3-entrypoints >= 0.3
+BuildRequires:	python3-entrypoints < 0.4
 BuildRequires:	python3-mccabe >= 0.6.0
 BuildRequires:	python3-mccabe < 0.7.0
-BuildRequires:	python3-pycodestyle >= 2.0.0
-BuildRequires:	python3-pycodestyle < 2.4.0
-BuildRequires:	python3-pyflakes >= 1.5.0
-BuildRequires:	python3-pyflakes < 1.7.0
+BuildRequires:	python3-pycodestyle >= 2.5.0
+BuildRequires:	python3-pycodestyle < 2.6.0
+BuildRequires:	python3-pyflakes >= 2.1.0
+BuildRequires:	python3-pyflakes < 2.2.0
 BuildRequires:	python3-pytest
-BuildRequires:	python3-pytest-runner
 BuildRequires:	sed >= 4.0
 %endif
 %endif
 %if %{with doc}
 BuildRequires:	python3-sphinx-prompt
-BuildRequires:	sphinx-pdg-3
+BuildRequires:	sphinx-pdg-3 >= 1.3
 %endif
 %if %{with python3}
 Requires:	python3-flake8 = %{version}-%{release}
@@ -127,18 +130,27 @@ Dokumentacja API modułu Pythona flake8.
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+%{__python} -m pytest -rw tests
+%endif
 %endif
 
 %if %{with python3}
 # don't require standalone mock
 %{__sed} -i -e 's/import mock/from unittest import mock/' $(grep 'import mock' tests/ -rl)
 
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest -rw tests
+%endif
 %endif
 
 %if %{with doc}
@@ -159,11 +171,6 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %py3_install
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/flake8{,-3}
-
-# avoid dependencies on python3egg(configparser), python3egg(enum34)
-%{__sed} -i -e "/^\[:python_version *< *'3\.2']/,/^$/ d" \
-	-e "/^\[:python_version *< *'3\.4']/,/^$/ d" \
-	$RPM_BUILD_ROOT%{py3_sitescriptdir}/flake8-%{version}-py*.egg-info/requires.txt
 %endif
 
 ln -s flake-%{!?with_python3:2}%{?with_python3:3} $RPM_BUILD_ROOT%{_bindir}/flake8
diff --git a/flake8-mock.patch b/flake8-mock.patch
deleted file mode 100644
index 01b242a..0000000
--- a/flake8-mock.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- flake8-3.3.0/setup.py.orig	2017-02-06 20:38:21.000000000 +0100
-+++ flake8-3.3.0/setup.py	2017-04-17 11:04:33.964940324 +0200
-@@ -12,7 +12,9 @@
- import flake8
- 
- 
--tests_require = ['mock >= 2.0.0', 'pytest']
-+tests_require = ['pytest']
-+if (sys.version_info.major, sys.version_info.minor) < (3, 3):
-+    tests_require.append('mock >= 2.0.0')
- 
- # NOTE(sigmavirus24): When updating these requirements, update them in
- # setup.cfg as well.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/flake8.git/commitdiff/182038705195fb5209e23e0bbc64f935722e43e3



More information about the pld-cvs-commit mailing list