[arch-commits] Commit in python-pytest-twisted/trunk (PKGBUILD)

Antonio Rojas arojas at archlinux.org
Fri Nov 1 08:23:22 UTC 2019


    Date: Friday, November 1, 2019 @ 08:23:21
  Author: arojas
Revision: 521755

Drop python 2

Modified:
  python-pytest-twisted/trunk/PKGBUILD

----------+
 PKGBUILD |   35 ++++++-----------------------------
 1 file changed, 6 insertions(+), 29 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-01 08:21:17 UTC (rev 521754)
+++ PKGBUILD	2019-11-01 08:23:21 UTC (rev 521755)
@@ -1,7 +1,6 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
-pkgbase=python-pytest-twisted
-pkgname=('python-pytest-twisted' 'python2-pytest-twisted')
+pkgname=python-pytest-twisted
 pkgver=1.12
 pkgrel=1
 pkgdesc='A twisted plugin for py.test'
@@ -8,21 +7,13 @@
 arch=('any')
 license=('BSD')
 url='https://github.com/pytest-dev/pytest-twisted'
-makedepends=('python-pytest' 'python2-pytest' 'python-greenlet' 'python2-greenlet'
-             'python-decorator' 'python2-decorator' 'python-twisted' 'python2-twisted')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-twisted/archive/v$pkgver.tar.gz")
+depends=('python-pytest' 'python-greenlet' 'python-decorator' 'python-twisted')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-twisted/archive/v$pkgver.tar.gz")
 sha512sums=('3fb5bdea9632ebd830637be8bef15432859e4689e41d2f87258dc5404734d98b76d26de494e80464f4321db6016836851daff5ff4eaf083fa7159cc8381e35bf')
 
-prepare() {
-  cp -a pytest-twisted-$pkgver{,-py2}
-}
-
 build() {
   cd "$srcdir"/pytest-twisted-$pkgver
   python setup.py build
-
-  cd "$srcdir"/pytest-twisted-$pkgver-py2
-  python2 setup.py build
 }
 
 check() {
@@ -30,25 +21,11 @@
 
   cd "$srcdir"/pytest-twisted-$pkgver
   python setup.py install --root="$PWD/tmp_install" --optimize=1
-  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH" py.test
-
-  cd "$srcdir"/pytest-twisted-$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
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  PYTHONPATH="$PWD/tmp_install/${site_packages}:$PYTHONPATH" py.test
 }
 
-package_python-pytest-twisted() {
-  depends=('python-pytest' 'python-greenlet' 'python-decorator' 'python-twisted')
-
+package() {
   cd pytest-twisted-$pkgver
   python setup.py install --root="$pkgdir" --optimize=1
 }
-
-package_python2-pytest-twisted() {
-  depends=('python2-pytest' 'python2-greenlet' 'python2-decorator' 'python2-twisted')
-
-  cd pytest-twisted-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --optimize=1
-}
-
-# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list