Date: Wednesday, February 26, 2020 @ 22:23:35
  Author: felixonmars
Revision: 583424

upgpkg: python-hpack 3.0.0-4: remove python2 sibling

Modified:
  python-hpack/trunk/PKGBUILD

----------+
 PKGBUILD |   44 ++++++++++++++------------------------------
 1 file changed, 14 insertions(+), 30 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-02-26 22:22:53 UTC (rev 583423)
+++ PKGBUILD    2020-02-26 22:23:35 UTC (rev 583424)
@@ -1,52 +1,36 @@
 # Maintainer: Felix Yan <felixonm...@archlinux.org>
 
-pkgbase=python-hpack
-pkgname=(python-hpack python2-hpack)
+pkgname=python-hpack
 pkgver=3.0.0
-pkgrel=3
+pkgrel=4
 pkgdesc="Pure-Python HPACK header compression"
 arch=('any')
 url="https://hyper.rtfd.org/";
 license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools' 'git')
-checkdepends=('python-pytest-runner' 'python2-pytest-runner' 
'python-hypothesis' 'python2-hypothesis')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/python-hyper/hpack/archive/v$pkgver.tar.gz";)
-sha512sums=('7b9cf5e643dff2a6454bfe419b797c8ed1a0fe6ec3b725d2696da5a820ab96fe87a64e600b1831c7024bd82616b155a0aa058301acb32172155b6538ba0a73c6')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-hypothesis')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/python-hyper/hpack/archive/v$pkgver.tar.gz";
+        
$pkgname-pytest-5.patch::https://github.com/python-hyper/hpack/commit/97207a9e88f906cf8e4198aec20b24ef97764486.patch)
+sha512sums=('7b9cf5e643dff2a6454bfe419b797c8ed1a0fe6ec3b725d2696da5a820ab96fe87a64e600b1831c7024bd82616b155a0aa058301acb32172155b6538ba0a73c6'
+            
'04bea1bdf3365d923e3b29492467814219b63ab35beecd8f4e2c2fdb0c482f0aa92a10d83011cae129f574725bff99fb25ad325d151c6888ab8e67b879faa323')
 
 prepare() {
-  cp -a hpack-$pkgver{,-py2}
+  patch -d hpack-$pkgver -p1 -i ../$pkgname-pytest-5.patch || :
 }
 
 build() {
-  cd "$srcdir"/hpack-$pkgver
+  cd hpack-$pkgver
   python setup.py build
-
-  cd "$srcdir"/hpack-$pkgver-py2
-  python2 setup.py build
 }
 
 check() {
-  cd "$srcdir"/hpack-$pkgver
-  python setup.py pytest --addopts test
-
-  cd "$srcdir"/hpack-$pkgver-py2
-  python2 setup.py pytest --addopts test
+  cd hpack-$pkgver
+  python -m pytest test
 }
 
-package_python-hpack() {
-  depends=('python')
-
+package() {
   cd hpack-$pkgver
   python setup.py install -O1 --root "$pkgdir"
-
   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
-
-package_python2-hpack() {
-  depends=('python2')
-
-  cd hpack-$pkgver-py2
-  python2 setup.py install -O1 --root "$pkgdir"
-
-  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}

Reply via email to