Date: Friday, October 25, 2019 @ 15:54:29
  Author: felixonmars
Revision: 519263

archrelease: copy trunk to community-staging-any

Added:
  python-hpack/repos/community-staging-any/
  python-hpack/repos/community-staging-any/PKGBUILD
    (from rev 519262, python-hpack/trunk/PKGBUILD)

----------+
 PKGBUILD |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

Copied: python-hpack/repos/community-staging-any/PKGBUILD (from rev 519262, 
python-hpack/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2019-10-25 15:54:29 UTC (rev 519263)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgbase=python-hpack
+pkgname=(python-hpack python2-hpack)
+pkgver=3.0.0
+pkgrel=3
+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')
+
+prepare() {
+  cp -a hpack-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/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
+}
+
+package_python-hpack() {
+  depends=('python')
+
+  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