guix-commits
[Top][All Lists]
Advanced

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

07/28: gnu: python-pyflakes: Fix build.


From: guix-commits
Subject: 07/28: gnu: python-pyflakes: Fix build.
Date: Fri, 15 Jan 2021 16:34:46 -0500 (EST)

apteryx pushed a commit to branch core-updates
in repository guix.

commit 43c889de85e79f279931d6cced261f54c9be5075
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Jan 14 22:48:47 2021 -0500

    gnu: python-pyflakes: Fix build.
    
    * gnu/packages/patches/python-pyflakes-fix-tests.patch: Add patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/python-xyz.scm (python-pyflakes)[patches]: Apply it.
    [home-page]: Update.
---
 gnu/local.mk                                       |  1 +
 .../patches/python-pyflakes-fix-tests.patch        | 40 ++++++++++++++++++++++
 gnu/packages/python-xyz.scm                        |  8 ++---
 3 files changed, 45 insertions(+), 4 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f48e3ec..35fd151 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1529,6 +1529,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-keras-integration-test.patch     \
   %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch   \
+  %D%/packages/patches/python-pyflakes-fix-tests.patch         \
   %D%/packages/patches/python-flint-includes.patch             \
   %D%/packages/patches/python-libxml2-python39-compat.patch    \
   %D%/packages/patches/python-libxml2-utf8.patch               \
diff --git a/gnu/packages/patches/python-pyflakes-fix-tests.patch 
b/gnu/packages/patches/python-pyflakes-fix-tests.patch
new file mode 100644
index 0000000..48107c8
--- /dev/null
+++ b/gnu/packages/patches/python-pyflakes-fix-tests.patch
@@ -0,0 +1,40 @@
+From c873a25136dfdb062855b595cdf0a992ac825adf Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Sat, 3 Oct 2020 01:36:15 +0200
+Subject: [PATCH] Fix tests with Python 3.9, closes #549
+
+---
+ pyflakes/test/test_api.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 8e1e3c9c..906fb396 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -517,6 +515,8 @@ def foo(bar=baz, bax):
+             if ERROR_HAS_LAST_LINE:
+                 if PYPY:
+                     column = 7
++                elif sys.version_info >= (3, 9):
++                    column = 21
+                 elif sys.version_info >= (3, 8):
+                     column = 9
+                 else:
+@@ -545,6 +545,8 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
+             if ERROR_HAS_LAST_LINE:
+                 if PYPY:
+                     column = 12
++                elif sys.version_info >= (3, 9):
++                    column = 17
+                 elif sys.version_info >= (3, 8):
+                     column = 14
+                 else:
+@@ -579,6 +581,8 @@ def test_invalidEscape(self):
+                 position_end = 1
+                 if PYPY:
+                     column = 6
++                elif ver >= (3,9):
++                    column = 13
+                 else:
+                     column = 7
+                     # Column has been "fixed" since 3.2.4 and 3.3.1
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 432ff39..98c2639 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -53,7 +53,7 @@
 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer 
<maxim.cournoyer@gmail.com>
 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
@@ -8236,10 +8236,10 @@ PEP 8.")
         (uri (pypi-uri "pyflakes" version))
         (sha256
           (base32
-            "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
+           "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
+        (patches (search-patches "python-pyflakes-fix-tests.patch"))))
     (build-system python-build-system)
-    (home-page
-      "https://github.com/pyflakes/pyflakes";)
+    (home-page "https://github.com/PyCQA/pyflakes";)
     (synopsis "Passive checker of Python programs")
     (description
       "Pyflakes statically checks Python source code for common errors.")



reply via email to

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