[arch-commits] Commit in python-construct/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Dec 9 21:00:26 UTC 2017


    Date: Saturday, December 9, 2017 @ 21:00:25
  Author: felixonmars
Revision: 273402

archrelease: copy trunk to community-testing-any

Added:
  python-construct/repos/community-testing-any/
  python-construct/repos/community-testing-any/PKGBUILD
    (from rev 273401, python-construct/trunk/PKGBUILD)

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

Copied: python-construct/repos/community-testing-any/PKGBUILD (from rev 273401, python-construct/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2017-12-09 21:00:25 UTC (rev 273402)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-construct
+pkgname=('python-construct' 'python2-construct')
+pkgver=2.8.17
+pkgrel=1
+pkgdesc="A powerful declarative parser/builder for binary data"
+arch=('any')
+license=('MIT')
+url="http://construct.readthedocs.org"
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-numpy' 'python2-numpy')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/construct/construct/archive/v$pkgver.tar.gz")
+sha512sums=('5bca40d7f33f336ab2a66546027c8bf24bf1b0125bcf425063b3bab14b1e3a96577d602db1eb73cb0ee99f90d92af6e24fcbd228912c0a70de6b2bd7d33e75be')
+
+prepare() {
+  cp -a construct-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/construct-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/construct-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/construct-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/construct-$pkgver-py2
+  python2 setup.py pytest
+}
+
+package_python-construct() {
+  depends=('python')
+
+  cd construct-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-construct() {
+  depends=('python2')
+
+  cd construct-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list