aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-traceback2
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-traceback2')
-rw-r--r--testing/py-traceback2/APKBUILD52
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"