mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-27 09:21:41 +02:00
53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
# 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"
|