aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-03 00:39:28 -0300
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-12 19:25:24 +0000
commit259638bb88f30fc52abc886ff2114d2d5d44a133 (patch)
tree25948840373da5957164b73afebda08c21ec4660 /testing
parentabffcbc95969efdd848ed0cd8f24c740dd9059df (diff)
downloadaports-259638bb88f30fc52abc886ff2114d2d5d44a133.tar.bz2
aports-259638bb88f30fc52abc886ff2114d2d5d44a133.tar.xz
testing/py2-traceback2: Switch to purely python2
- This is a backport of a python3 module which can be imported as traceback - Explain why tests are disabled - Add missing deps
Diffstat (limited to 'testing')
-rw-r--r--testing/py2-traceback2/APKBUILD45
1 files changed, 9 insertions, 36 deletions
diff --git a/testing/py2-traceback2/APKBUILD b/testing/py2-traceback2/APKBUILD
index d4813784fb..d317a7bf3d 100644
--- a/testing/py2-traceback2/APKBUILD
+++ b/testing/py2-traceback2/APKBUILD
@@ -1,54 +1,27 @@
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
-pkgname=py-traceback2
-_pkgname=${pkgname#py-*}
+pkgname=py2-traceback2
+_pkgname=${pkgname#py2-*}
pkgver=1.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="Backport of the Python3 stdlib traceback module"
+options="!check" # Depends on py2-unittest2 for tests which depends on this package
url="https://github.com/testing-cabal/traceback2"
arch="noarch"
license="PSF"
-makedepends="python2-dev python3-dev py-setuptools py-pbr"
-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"
+depends="py-linecache2"
+makedepends="git py-setuptools py-pbr"
source="$pkgname-$pkgver.tar.gz::https://github.com/testing-cabal/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
+replaces="py-traceback2 py3-traceback2" # Backwards compatibility
build() {
- cd "$builddir"
git init # workaround python pbr picking up the git version from aports
-
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"
+ python2 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="33ef29ab051d5ddca1dc3e802cd0cbaf216067157b4e5bea4bb0481cd7a6758614fc551d614b5bcf3354757b315b9549bde9ff9c552980fb75ddb3aa31909d79 py-traceback2-1.4.0.tar.gz"
+sha512sums="33ef29ab051d5ddca1dc3e802cd0cbaf216067157b4e5bea4bb0481cd7a6758614fc551d614b5bcf3354757b315b9549bde9ff9c552980fb75ddb3aa31909d79 py2-traceback2-1.4.0.tar.gz"