[arch-commits] Commit in python-pyflakes/repos/community-staging-any (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Wed Nov 11 12:05:11 UTC 2020
Date: Wednesday, November 11, 2020 @ 12:05:11
Author: foutrelis
Revision: 750764
archrelease: copy trunk to community-staging-any
Added:
python-pyflakes/repos/community-staging-any/PKGBUILD
(from rev 750763, python-pyflakes/trunk/PKGBUILD)
python-pyflakes/repos/community-staging-any/py39.patch
(from rev 750763, python-pyflakes/trunk/py39.patch)
Deleted:
python-pyflakes/repos/community-staging-any/PKGBUILD
------------+
PKGBUILD | 125 ++++++++++++++++++++-------------------
py39.patch | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 252 insertions(+), 61 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-11-11 12:05:07 UTC (rev 750763)
+++ PKGBUILD 2020-11-11 12:05:11 UTC (rev 750764)
@@ -1,61 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Karol 'Kenji Takahashi' Woźniak <kenji.sx>
-# Contributor: Tianjiao Yin <ytj000+AUR at gmail.com>
-# Contributor: Thomas Dziedzic < gostrc at gmail >
-# Contributor: TDY <tdy at gmx.com>
-# Contributor: Tiago Pierezan Camargo <tcamargo at gmail.com>
-
-pkgbase=python-pyflakes
-pkgname=(python-pyflakes python2-pyflakes)
-pkgver=2.2.0
-pkgrel=2
-pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code'
-arch=('any')
-url='https://pypi.python.org/pypi/pyflakes'
-license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.io/packages/source/p/pyflakes/pyflakes-$pkgver.tar.gz")
-sha512sums=('6a411efef261874c216b71bcb095412448a8cbeefdf7fa5577d4f4edd48a4a740a4433665e87e5dda2c08fd9ee3bfb7f134f56c7523e1303243edfa92b0ccb35')
-
-prepare() {
- cp -a "pyflakes-$pkgver"{,-py2}
-}
-
-build() {
- cd "$srcdir"/pyflakes-$pkgver
- python setup.py build
-
- cd "$srcdir"/pyflakes-$pkgver-py2
- python2 setup.py build
-}
-
-check() {
- cd "$srcdir"/pyflakes-$pkgver
- python setup.py test
-
- cd "$srcdir"/pyflakes-$pkgver-py2
- python2 setup.py test
-}
-
-package_python-pyflakes() {
- depends=('python-setuptools')
-
- cd pyflakes-$pkgver
- python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
-
- # We have python 3 as default python, and want to keep compatibility with the old pyflakes3k naming
- ln -s pyflakes "$pkgdir/usr/bin/pyflakes3k"
-
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_python2-pyflakes() {
- depends=('python2-setuptools')
-
- cd pyflakes-$pkgver-py2
- python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
-
- mv "$pkgdir"/usr/bin/pyflakes{,-python2}
-
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Copied: python-pyflakes/repos/community-staging-any/PKGBUILD (from rev 750763, python-pyflakes/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-11-11 12:05:11 UTC (rev 750764)
@@ -0,0 +1,64 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Karol 'Kenji Takahashi' Woźniak <kenji.sx>
+# Contributor: Tianjiao Yin <ytj000+AUR at gmail.com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: TDY <tdy at gmx.com>
+# Contributor: Tiago Pierezan Camargo <tcamargo at gmail.com>
+
+pkgbase=python-pyflakes
+pkgname=(python-pyflakes python2-pyflakes)
+pkgver=2.2.0
+pkgrel=3
+pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code'
+arch=('any')
+url='https://pypi.python.org/pypi/pyflakes'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("https://pypi.io/packages/source/p/pyflakes/pyflakes-$pkgver.tar.gz"
+ py39.patch)
+sha512sums=('6a411efef261874c216b71bcb095412448a8cbeefdf7fa5577d4f4edd48a4a740a4433665e87e5dda2c08fd9ee3bfb7f134f56c7523e1303243edfa92b0ccb35'
+ 'c85c175abd2ef89e93e77e5096dd1531d3b6da8a5b6fdd55b0289a21a5792d517576dd354c13688bf1ff7072cc3fd20cbcd695691895b8a059bdd0e31d7b9996')
+
+prepare() {
+ patch -Np1 -d pyflakes-$pkgver <py39.patch
+ cp -a "pyflakes-$pkgver"{,-py2}
+}
+
+build() {
+ cd "$srcdir"/pyflakes-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pyflakes-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/pyflakes-$pkgver
+ python setup.py test
+
+ cd "$srcdir"/pyflakes-$pkgver-py2
+ python2 setup.py test
+}
+
+package_python-pyflakes() {
+ depends=('python-setuptools')
+
+ cd pyflakes-$pkgver
+ python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+
+ # We have python 3 as default python, and want to keep compatibility with the old pyflakes3k naming
+ ln -s pyflakes "$pkgdir/usr/bin/pyflakes3k"
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-pyflakes() {
+ depends=('python2-setuptools')
+
+ cd pyflakes-$pkgver-py2
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+
+ mv "$pkgdir"/usr/bin/pyflakes{,-python2}
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Copied: python-pyflakes/repos/community-staging-any/py39.patch (from rev 750763, python-pyflakes/trunk/py39.patch)
===================================================================
--- py39.patch (rev 0)
+++ py39.patch 2020-11-11 12:05:11 UTC (rev 750764)
@@ -0,0 +1,188 @@
+From e83d920aafa92df9bda7dad606d401dda1ba722d Mon Sep 17 00:00:00 2001
+From: Petter Strandmark <petter.strandmark at gmail.com>
+Date: Mon, 27 Apr 2020 00:53:00 +0200
+Subject: [PATCH] Fix test for nightly Python (3.9) (#532)
+
+* Fix test for nightly Python (3.9)
+
+* allow_failures: true for nightly
+
+Co-authored-by: Anthony Sottile <asottile at umich.edu>
+---
+ .travis.yml | 5 +++++
+ pyflakes/test/test_api.py | 2 ++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 128aa69..b579ac8 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -449,6 +449,8 @@ def evaluate(source):
+ with self.makeTempFile(source) as sourcePath:
+ if PYPY:
+ message = 'end of file (EOF) while scanning triple-quoted string literal'
++ elif sys.version_info >= (3, 9):
++ message = 'invalid string prefix'
+ else:
+ message = 'invalid syntax'
+
+
+From 684edfc8833bdb90b0a8ae562fd24d0e1e2fb686 Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis at gmail.com>
+Date: Fri, 2 Oct 2020 23:34:24 +0200
+Subject: [PATCH] Fix test_invalidEscape with recent PyPy3 versions, closes
+ #584 (#585)
+
+* Fix test_invalidEscape with recent PyPy3 versions, closes #584
+
+* CI: update PyPY version in Travis and AppVeyor
+
+Also make it easier to update for AppVeyor.
+---
+ .appveyor.yml | 22 +++++++++++++---------
+ .travis.yml | 4 ++--
+ pyflakes/test/test_api.py | 23 +++++++----------------
+ tox.ini | 1 +
+ 4 files changed, 23 insertions(+), 27 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index b579ac8..8e1e3c9 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -515,7 +515,7 @@ def foo(bar=baz, bax):
+ """
+ with self.makeTempFile(source) as sourcePath:
+ if ERROR_HAS_LAST_LINE:
+- if PYPY and sys.version_info >= (3,):
++ if PYPY:
+ column = 7
+ elif sys.version_info >= (3, 8):
+ column = 9
+@@ -543,7 +543,7 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
+ """
+ with self.makeTempFile(source) as sourcePath:
+ if ERROR_HAS_LAST_LINE:
+- if PYPY and sys.version_info >= (3,):
++ if PYPY:
+ column = 12
+ elif sys.version_info >= (3, 8):
+ column = 14
+@@ -578,7 +578,7 @@ def test_invalidEscape(self):
+ else:
+ position_end = 1
+ if PYPY:
+- column = 6
++ column = 5
+ else:
+ column = 7
+ # Column has been "fixed" since 3.2.4 and 3.3.1
+@@ -717,13 +717,6 @@ class IntegrationTests(TestCase):
+ """
+ Tests of the pyflakes script that actually spawn the script.
+ """
+-
+- # https://bitbucket.org/pypy/pypy/issues/3069/pypy36-on-windows-incorrect-line-separator
+- if PYPY and sys.version_info >= (3,) and WIN:
+- LINESEP = '\n'
+- else:
+- LINESEP = os.linesep
+-
+ def setUp(self):
+ self.tempdir = tempfile.mkdtemp()
+ self.tempfilepath = os.path.join(self.tempdir, 'temp')
+@@ -784,7 +777,7 @@ def test_fileWithFlakes(self):
+ fd.write("import contraband\n".encode('ascii'))
+ d = self.runPyflakes([self.tempfilepath])
+ expected = UnusedImport(self.tempfilepath, Node(1), 'contraband')
+- self.assertEqual(d, ("%s%s" % (expected, self.LINESEP), '', 1))
++ self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1))
+
+ def test_errors_io(self):
+ """
+@@ -794,7 +787,7 @@ def test_errors_io(self):
+ """
+ d = self.runPyflakes([self.tempfilepath])
+ error_msg = '%s: No such file or directory%s' % (self.tempfilepath,
+- self.LINESEP)
++ os.linesep)
+ self.assertEqual(d, ('', error_msg, 1))
+
+ def test_errors_syntax(self):
+@@ -807,7 +800,7 @@ def test_errors_syntax(self):
+ fd.write("import".encode('ascii'))
+ d = self.runPyflakes([self.tempfilepath])
+ error_msg = '{0}:1:{2}: invalid syntax{1}import{1} {3}^{1}'.format(
+- self.tempfilepath, self.LINESEP, 6 if PYPY else 7, '' if PYPY else ' ')
++ self.tempfilepath, os.linesep, 6 if PYPY else 7, '' if PYPY else ' ')
+ self.assertEqual(d, ('', error_msg, 1))
+
+ def test_readFromStdin(self):
+@@ -816,15 +809,13 @@ def test_readFromStdin(self):
+ """
+ d = self.runPyflakes([], stdin='import contraband')
+ expected = UnusedImport('<stdin>', Node(1), 'contraband')
+- self.assertEqual(d, ("%s%s" % (expected, self.LINESEP), '', 1))
++ self.assertEqual(d, ("%s%s" % (expected, os.linesep), '', 1))
+
+
+ class TestMain(IntegrationTests):
+ """
+ Tests of the pyflakes main function.
+ """
+- LINESEP = os.linesep
+-
+ def runPyflakes(self, paths, stdin=None):
+ try:
+ with SysStreamCapturing(stdin) as capture:
+
+From 6a5f38b5ab12260fde8a0463acd433bc2d34dbcf Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis at gmail.com>
+Date: Sat, 3 Oct 2020 02:37:53 +0200
+Subject: [PATCH] Fix tests with Python 3.9, closes #549 (#586)
+
+Stop allowing failures on Python nightly.
+---
+ .travis.yml | 7 +------
+ pyflakes/test/test_api.py | 8 ++++++--
+ 2 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 8e1e3c9..d379b3b 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -449,8 +449,6 @@ def evaluate(source):
+ with self.makeTempFile(source) as sourcePath:
+ if PYPY:
+ message = 'end of file (EOF) while scanning triple-quoted string literal'
+- elif sys.version_info >= (3, 9):
+- message = 'invalid string prefix'
+ else:
+ message = 'invalid syntax'
+
+@@ -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 = 5
++ elif ver >= (3, 9):
++ column = 13
+ else:
+ column = 7
+ # Column has been "fixed" since 3.2.4 and 3.3.1
More information about the arch-commits
mailing list