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

Felix Yan felixonmars at archlinux.org
Thu Feb 15 12:21:25 UTC 2018


    Date: Thursday, February 15, 2018 @ 12:21:25
  Author: felixonmars
Revision: 294597

archrelease: copy trunk to community-testing-any

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

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

Copied: python-construct/repos/community-testing-any/PKGBUILD (from rev 294596, python-construct/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-02-15 12:21:25 UTC (rev 294597)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-construct
+pkgname=('python-construct' 'python2-construct')
+pkgver=2.9.30
+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'
+              'python-pytest-benchmark' 'python2-pytest-benchmark')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/construct/construct/archive/v$pkgver.tar.gz")
+sha512sums=('7b343647247a421a144a1a5438e3ccc08adc614a25532d537b7ec0af020371e13c0212804a61e6375ac7529efdccaf948e70f823d43605e880ffb132b74fef88')
+
+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 || warning "TODO: figure out benchmark related failures"
+}
+
+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