[arch-commits] Commit in python-construct/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Thu Oct 5 14:18:55 UTC 2017
Date: Thursday, October 5, 2017 @ 14:18:54
Author: felixonmars
Revision: 261748
archrelease: copy trunk to community-testing-any
Added:
python-construct/repos/community-testing-any/
python-construct/repos/community-testing-any/PKGBUILD
(from rev 261747, python-construct/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: python-construct/repos/community-testing-any/PKGBUILD (from rev 261747, python-construct/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2017-10-05 14:18:54 UTC (rev 261748)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-construct
+pkgname=('python-construct' 'python2-construct')
+pkgver=2.8.16
+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=('6128da944b323b58f79a9b386fd9dba65fdcc31ce8da2b6cafebfe2f126031dd77ffcfe4885020b6122304acf0b0f87792ddf79669517b21ac1f49952c2c46ee')
+
+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