[arch-commits] Commit in python-pyflakes/repos (3 files)

Felix Yan fyan at archlinux.org
Sat Sep 19 13:07:44 UTC 2015


    Date: Saturday, September 19, 2015 @ 15:07:44
  Author: fyan
Revision: 140801

archrelease: copy trunk to community-staging-any

Added:
  python-pyflakes/repos/community-staging-any/
  python-pyflakes/repos/community-staging-any/PKGBUILD
    (from rev 140800, python-pyflakes/trunk/PKGBUILD)
  python-pyflakes/repos/community-staging-any/python-3.5.patch
    (from rev 140800, python-pyflakes/trunk/python-3.5.patch)

------------------+
 PKGBUILD         |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 python-3.5.patch |   34 ++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)

Copied: python-pyflakes/repos/community-staging-any/PKGBUILD (from rev 140800, python-pyflakes/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2015-09-19 13:07:44 UTC (rev 140801)
@@ -0,0 +1,68 @@
+# $Id$
+# 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)
+_reponame=pyflakes
+pkgver=0.9.2
+pkgrel=2
+pkgdesc='A lint-like tool for Python to identify common errors quickly without executing code'
+arch=('any')
+url='http://pypi.python.org/pypi/pyflakes'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("http://pypi.python.org/packages/source/p/pyflakes/${_reponame}-${pkgver}.tar.gz"
+        python-3.5.patch)
+sha1sums=('522b7f7fa5967360e388d0ba72d8c7597785bfd0'
+          '51e527adbad4f0d672f939290e2aebb545b37983')
+
+prepare() {
+  (cd ${_reponame}-${pkgver}; patch -p1 -i ../python-3.5.patch)
+  cp -a "${_reponame}-${pkgver}"{,-py2}
+}
+
+build() {
+  cd "$srcdir/${_reponame}-${pkgver}"
+  python setup.py build
+
+  cd "$srcdir/${_reponame}-${pkgver}-py2"
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir/${_reponame}-${pkgver}"
+  python setup.py test
+
+  cd "$srcdir/${_reponame}-${pkgver}-py2"
+  python2 setup.py test
+}
+
+package_python-pyflakes() {
+  depends=('python-setuptools')
+
+  cd "${_reponame}-${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 "${_reponame}-${pkgver}-py2"
+
+  python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
+
+  mv "${pkgdir}/usr/bin/pyflakes" "${pkgdir}/usr/bin/pyflakes-python2"
+
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}

Copied: python-pyflakes/repos/community-staging-any/python-3.5.patch (from rev 140800, python-pyflakes/trunk/python-3.5.patch)
===================================================================
--- community-staging-any/python-3.5.patch	                        (rev 0)
+++ community-staging-any/python-3.5.patch	2015-09-19 13:07:44 UTC (rev 140801)
@@ -0,0 +1,34 @@
+From bf62d389bdbe2085f765f648de536eb44979e448 Mon Sep 17 00:00:00 2001
+From: Steven Myint <git at stevenmyint.com>
+Date: Fri, 10 Jul 2015 07:17:51 -0700
+Subject: [PATCH] Fix a test under Python 3.5
+
+---
+ pyflakes/test/test_api.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index ad61983..a83a7fd 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -385,12 +385,18 @@ def test_nonKeywordAfterKeywordSyntaxError(self):
+         sourcePath = self.makeTempFile(source)
+         last_line = '            ^\n' if sys.version_info >= (3, 2) else ''
+         column = '13:' if sys.version_info >= (3, 2) else ''
++
++        if sys.version_info >= (3, 5):
++            message = 'positional argument follows keyword argument'
++        else:
++            message = 'non-keyword arg after keyword arg'
++
+         self.assertHasErrors(
+             sourcePath,
+             ["""\
+-%s:1:%s non-keyword arg after keyword arg
++%s:1:%s %s
+ foo(bar=baz, bax)
+-%s""" % (sourcePath, column, last_line)])
++%s""" % (sourcePath, column, message, last_line)])
+ 
+     def test_invalidEscape(self):
+         """



More information about the arch-commits mailing list