[arch-commits] Commit in flake8/repos/community-any (3 files)
Felix Yan
fyan at archlinux.org
Tue Oct 27 04:00:10 UTC 2015
Date: Tuesday, October 27, 2015 @ 05:00:09
Author: fyan
Revision: 145061
archrelease: copy trunk to community-any
Added:
flake8/repos/community-any/PKGBUILD
(from rev 145060, flake8/trunk/PKGBUILD)
Deleted:
flake8/repos/community-any/PKGBUILD
flake8/repos/community-any/fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch
-------------------------------------------------------------+
PKGBUILD | 144 ++++------
fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch | 43 --
2 files changed, 69 insertions(+), 118 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2015-10-27 03:59:50 UTC (rev 145060)
+++ PKGBUILD 2015-10-27 04:00:09 UTC (rev 145061)
@@ -1,75 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at gmail.com>
-# Contributor: Karol "Kenji Takahashi" Woźniak <kenji.sx>
-# Contributor: spider-mario <spidermario at free.fr>
-# Contributor: Allen Li <darkfeline at abagofapples.com>
-
-pkgbase=flake8
-pkgname=(flake8 python2-flake8)
-pkgver=2.4.1
-pkgrel=3
-epoch=1
-pkgdesc="The modular source code checker: pep8, pyflakes and co"
-arch=('any')
-url="http://bitbucket.org/tarek/flake8"
-license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pyflakes' 'python2-pyflakes'
- 'pep8' 'python2-pep8' 'python-mccabe' 'python2-mccabe')
-checkdepends=('python-nose' 'python2-nose' 'python2-mock')
-source=("https://pypi.python.org/packages/source/f/${pkgbase}/${pkgbase}-${pkgver}.tar.gz"
- 'fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch')
-md5sums=('ed45d3db81a3b7c88bd63c6e37ca1d65'
- '76004de2511275c09fba49c43691aaf0')
-
-prepare() {
- # We have patched pep8 to fix the problem, allowing 1.6.2)
- sed -e 's/pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2/pep8 >= 1.5.7, != 1.6.0, != 1.6.1/' \
- -e 's/pyflakes >= 0.8.1, < 0.9/pyflakes >= 0.8.1/' \
- -i $pkgbase-$pkgver/setup.py
-
- # Fix test to work with Python 3.5's unittest.mock
- patch -d ${pkgbase}-${pkgver} -Np1 <fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch
-
- cp -a ${pkgbase}-${pkgver}{,-py2}
-}
-
-build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
- python setup.py build
-
- cd "${srcdir}/${pkgbase}-${pkgver}-py2"
- python2 setup.py build
-}
-
-check() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
- python setup.py test
-
- cd "${srcdir}/${pkgbase}-${pkgver}-py2"
- python2 setup.py test
-}
-
-package_flake8() {
- depends=('python-pyflakes' 'python-mccabe' 'pep8')
- provides=('flake8-python3')
- replaces=('flake8-python3')
- conflicts=('flake8-python3')
-
- cd "${srcdir}/${pkgbase}-${pkgver}"
- python setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-package_python2-flake8() {
- depends=('python2-pyflakes' 'python2-mccabe' 'python2-pep8')
- provides=('flake8-python2')
- replaces=('flake8-python2')
- conflicts=('flake8-python2')
-
- cd "${srcdir}/${pkgbase}-${pkgver}-py2"
- python2 setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1
- mv "${pkgdir}/usr/bin/flake8" "${pkgdir}/usr/bin/flake8-python2"
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:
Copied: flake8/repos/community-any/PKGBUILD (from rev 145060, flake8/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2015-10-27 04:00:09 UTC (rev 145061)
@@ -0,0 +1,69 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Karol "Kenji Takahashi" Woźniak <kenji.sx>
+# Contributor: spider-mario <spidermario at free.fr>
+# Contributor: Allen Li <darkfeline at abagofapples.com>
+
+pkgbase=flake8
+pkgname=(flake8 python2-flake8)
+pkgver=2.5.0
+pkgrel=1
+epoch=1
+pkgdesc="The modular source code checker: pep8, pyflakes and co"
+arch=('any')
+url="http://bitbucket.org/tarek/flake8"
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pyflakes' 'python2-pyflakes'
+ 'pep8' 'python2-pep8' 'python-mccabe' 'python2-mccabe')
+checkdepends=('python-nose' 'python2-nose' 'python2-mock')
+source=("https://pypi.python.org/packages/source/f/${pkgbase}/${pkgbase}-${pkgver}.tar.gz")
+md5sums=('f239d055144a17cce76b3a402f112dc6')
+
+prepare() {
+ # We have patched pep8 to fix the problem, allowing 1.6.2)
+ sed -e 's/pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2/pep8 >= 1.5.7, != 1.6.0, != 1.6.1/' \
+ -i $pkgbase-$pkgver/setup.py
+
+ cp -a ${pkgbase}-${pkgver}{,-py2}
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ python setup.py build
+
+ cd "${srcdir}/${pkgbase}-${pkgver}-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ python setup.py test
+
+ cd "${srcdir}/${pkgbase}-${pkgver}-py2"
+ python2 setup.py test
+}
+
+package_flake8() {
+ depends=('python-pyflakes' 'python-mccabe' 'pep8')
+ provides=('flake8-python3')
+ replaces=('flake8-python3')
+ conflicts=('flake8-python3')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ python setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-flake8() {
+ depends=('python2-pyflakes' 'python2-mccabe' 'python2-pep8')
+ provides=('flake8-python2')
+ replaces=('flake8-python2')
+ conflicts=('flake8-python2')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}-py2"
+ python2 setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1
+ mv "${pkgdir}/usr/bin/flake8" "${pkgdir}/usr/bin/flake8-python2"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch
===================================================================
--- fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch 2015-10-27 03:59:50 UTC (rev 145060)
+++ fix-flake8-tests-using-mock-to-work-with-1.1.x-branch.patch 2015-10-27 04:00:09 UTC (rev 145061)
@@ -1,43 +0,0 @@
-From b0f30f97fbec04c1ab7cb8937f636822eab63885 Mon Sep 17 00:00:00 2001
-From: Ian Cordasco <graffatcolmingov at gmail.com>
-Date: Fri, 10 Jul 2015 09:34:49 -0500
-Subject: [PATCH] Fix flake8 tests using mock to work with 1.1.x branch
-
----
- flake8/tests/test_engine.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/flake8/tests/test_engine.py b/flake8/tests/test_engine.py
-index 06fe62a..60b388c 100644
---- a/flake8/tests/test_engine.py
-+++ b/flake8/tests/test_engine.py
-@@ -52,7 +52,7 @@ class TestEngine(unittest.TestCase):
- self.assertTrue(len(registered_exts[0]) > 0)
- for i in registered_exts[1:]:
- self.assertTrue(isinstance(i, list))
-- register_check.assert_called()
-+ self.assertTrue(register_check.called)
-
- def test_get_parser(self):
- # setup
-@@ -67,13 +67,13 @@ class TestEngine(unittest.TestCase):
- # actual call we're testing
- parser, hooks = engine.get_parser()
- # assertions
-- re.assert_called()
-- gpv.assert_called()
-+ self.assertTrue(re.called)
-+ self.assertTrue(gpv.called)
- pgp.assert_called_once_with(
- 'flake8',
- '%s (pyflakes: 0.7, mccabe: 0.2) Python Version' % __version__)
-- m.remove_option.assert_called()
-- m.add_option.assert_called()
-+ self.assertTrue(m.remove_option.called)
-+ self.assertTrue(m.add_option.called)
- self.assertEqual(parser, m)
- self.assertEqual(hooks, [])
- # clean-up
---
-2.5.2
-
More information about the arch-commits
mailing list