guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: python-flake8-polyfill: Fix building with python-flake8@4.


From: guix-commits
Subject: 03/05: gnu: python-flake8-polyfill: Fix building with python-flake8@4.
Date: Tue, 7 Jun 2022 02:49:40 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 49a47bdcc5fb6dd8363917ea005fb51155c8e266
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Jun 7 09:22:35 2022 +0300

    gnu: python-flake8-polyfill: Fix building with python-flake8@4.
    
    * gnu/packages/python-xyz.scm (python-flake8-polyfill)[source]: Add patch.
    * gnu/packages/patches/python-flake8-polyfill-flake8-4-compat.patch: New
    file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                       |  1 +
 .../python-flake8-polyfill-flake8-4-compat.patch   | 32 ++++++++++++++++++++++
 gnu/packages/python-xyz.scm                        |  3 +-
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 68b317b32a..4e58df6ff7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1593,6 +1593,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch           \
   %D%/packages/patches/pthreadpool-system-libraries.patch      \
   %D%/packages/patches/python-chai-drop-python2.patch          \
+  %D%/packages/patches/python-flake8-polyfill-flake8-4-compat.patch    \
   %D%/packages/patches/python-random2-getrandbits-test.patch           \
   %D%/packages/patches/python-poppler-qt5-fix-build.patch      \
   %D%/packages/patches/python-w3lib-fix-test-failure.patch     \
diff --git a/gnu/packages/patches/python-flake8-polyfill-flake8-4-compat.patch 
b/gnu/packages/patches/python-flake8-polyfill-flake8-4-compat.patch
new file mode 100644
index 0000000000..7f5babd07d
--- /dev/null
+++ b/gnu/packages/patches/python-flake8-polyfill-flake8-4-compat.patch
@@ -0,0 +1,32 @@
+https://github.com/PyCQA/flake8-polyfill/commit/3cf414350e82ceb835ca2edbd5d5967d33e9ff35.patch
+
+
+From 3cf414350e82ceb835ca2edbd5d5967d33e9ff35 Mon Sep 17 00:00:00 2001
+From: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
+Date: Mon, 1 Nov 2021 19:18:04 -0500
+Subject: [PATCH] Skip unnecessary tests on Flake8 4.x+
+
+---
+ tests/test_stdin.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/test_stdin.py b/tests/test_stdin.py
+index 4350967..212b309 100644
+--- a/tests/test_stdin.py
++++ b/tests/test_stdin.py
+@@ -1,4 +1,5 @@
+ """Tests for polyfill's stdin monkey patching."""
++import flake8
+ import pep8
+ import pycodestyle
+ import pytest
+@@ -6,6 +7,9 @@
+ from flake8_polyfill import stdin
+ from flake8_polyfill import version
+ 
++if (4, 0, 0) <= flake8.__version_info__:
++    pytestmark = pytest.mark.skip
++
+ 
+ def test_modules_dict():
+     """Verify that it works the way we expect."""
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b9af0d4a3f..d5ad05f4d9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10359,7 +10359,8 @@ unnecessary plus operators for explicit string literal 
concatenation.")
        (uri (pypi-uri "flake8-polyfill" version))
        (sha256
         (base32
-         "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
+         "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))
+       (patches (search-patches 
"python-flake8-polyfill-flake8-4-compat.patch"))))
     (build-system python-build-system)
     (arguments
      '(#:phases



reply via email to

[Prev in Thread] Current Thread [Next in Thread]