[arch-commits] Commit in flake8/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sat Jan 23 20:28:46 UTC 2021


    Date: Saturday, January 23, 2021 @ 20:28:46
  Author: felixonmars
Revision: 826887

upgpkg: flake8 1:3.8.4-4: remove python2 counterpart

Modified:
  flake8/trunk/PKGBUILD

----------+
 PKGBUILD |   53 +++++++++++++----------------------------------------
 1 file changed, 13 insertions(+), 40 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-01-23 20:28:24 UTC (rev 826886)
+++ PKGBUILD	2021-01-23 20:28:46 UTC (rev 826887)
@@ -3,70 +3,43 @@
 # Contributor: spider-mario <spidermario at free.fr>
 # Contributor: Allen Li <darkfeline at abagofapples.com>
 
-pkgbase=flake8
-pkgname=(flake8 python2-flake8)
+pkgname=flake8
 pkgver=3.8.4
-pkgrel=3
+pkgrel=4
 epoch=1
 pkgdesc="The modular source code checker: pep8, pyflakes and co"
 arch=('any')
 url="http://flake8.pycqa.org"
 license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pyflakes' 'python2-pyflakes'
-             'python-pycodestyle' 'python2-pycodestyle' 'python-mccabe' 'python2-mccabe'
-             'python2-enum34' 'python2-configparser' 'python-entrypoints' 'python2-entrypoints'
-             'python2-functools32' 'python2-typing')
-checkdepends=('python-mock' 'python2-mock' 'python-pytest' 'python2-pytest')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/PyCQA/flake8/archive/$pkgver.tar.gz")
+depends=('python-pyflakes' 'python-mccabe' 'python-pycodestyle' 'python-entrypoints')
+makedepends=('python-setuptools')
+checkdepends=('python-mock' 'python-pytest')
+source=("https://github.com/PyCQA/flake8/archive/$pkgver/$pkgname-$pkgver.tar.gz")
 sha512sums=('de2e22c2fa759870efe877e70a28a7b831648c719fe0ec2df953667932c9ff191d9268094454d0c8d9ed00235dd75a17166efebe5b7417f71c1b38207a4c5962')
 
 prepare() {
   sed -i -e 's/, *< *[0-9=.]*//' flake8-$pkgver/setup.py
-  cp -a flake8-$pkgver{,-py2}
+
+  sed -i '/error/a \    ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning' flake8-$pkgver/pytest.ini
 }
 
 build() {
-  cd "$srcdir"/flake8-$pkgver
+  cd flake8-$pkgver
   python setup.py build
-
-  cd "$srcdir"/flake8-$pkgver-py2
-  python2 setup.py build
 }
 
 check() {
   # Hack entry points by installing it
 
-  cd "$srcdir"/flake8-$pkgver
+  cd flake8-$pkgver
   python setup.py install --root="$PWD/tmp_install" --optimize=1
-  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.9/site-packages:$PYTHONPATH" py.test
-
-  cd "$srcdir"/flake8-$pkgver-py2
-  python2 setup.py install --root="$PWD/tmp_install" --optimize=1
-  PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.9/site-packages:$PYTHONPATH" pytest
 }
 
-package_flake8() {
-  depends=('python-pyflakes' 'python-mccabe' 'python-pycodestyle' 'python-entrypoints')
-  provides=('flake8-python3')
-  replaces=('flake8-python3')
-  conflicts=('flake8-python3')
-
-  cd "$srcdir"/flake8-$pkgver
+package() {
+  cd flake8-$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-pycodestyle' 'python2-entrypoints'
-           'python2-enum34' 'python2-configparser' 'python2-functools32' 'python2-typing')
-  provides=('flake8-python2')
-  replaces=('flake8-python2')
-  conflicts=('flake8-python2')
-
-  cd "$srcdir"/flake8-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --prefix=/usr --optimize=1
-  mv "$pkgdir"/usr/bin/flake8{,-python2}
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list