diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2017-07-25 00:11:25 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-14 21:13:01 +0100 |
commit | bbc43ab3bc1711b42e007044e6cad75080a17632 (patch) | |
tree | 8ebe4a083d2a3f88b32fc263e80a356c560aedf6 /testing/py-traceback2 | |
parent | a05bc05b8ecdc6bd680c0d5b0d4bd0034b6b9f7a (diff) | |
download | aports-bbc43ab3bc1711b42e007044e6cad75080a17632.tar.bz2 aports-bbc43ab3bc1711b42e007044e6cad75080a17632.tar.xz |
testing/py-traceback2: new aport
Diffstat (limited to 'testing/py-traceback2')
-rw-r--r-- | testing/py-traceback2/APKBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/py-traceback2/APKBUILD b/testing/py-traceback2/APKBUILD new file mode 100644 index 0000000000..333e094da6 --- /dev/null +++ b/testing/py-traceback2/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +pkgname=py-traceback2 +_pkgname=${pkgname#py-*} +pkgver=1.4.0 +pkgrel=0 +pkgdesc="Backport of the Python3 stdlib traceback module" +url="https://github.com/testing-cabal/traceback2" +arch="noarch" +license="PSF" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +options="!check" # temp disable until py2-unittest2 is in repos +#checkdepends="py2-contextlib2 py-fixtures py-testtools py2-unittest2 py2-linecache2 py-extras" +source="$pkgname-$pkgver.tar.gz::https://github.com/testing-cabal/$_pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 -m unittest2 discover + python3 -m unittest2 discover +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="33ef29ab051d5ddca1dc3e802cd0cbaf216067157b4e5bea4bb0481cd7a6758614fc551d614b5bcf3354757b315b9549bde9ff9c552980fb75ddb3aa31909d79 py-traceback2-1.4.0.tar.gz" |