diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-19 14:37:18 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-23 15:02:21 +0000 |
commit | 734869763991d8059cc220d1166ad23f9a8167fd (patch) | |
tree | c2416f6bf74cb7dd2f54bfc3366060ee546ef13e | |
parent | addcae8f3e7d031aae8bf530ea1a7b4247c0a01c (diff) | |
download | aports-734869763991d8059cc220d1166ad23f9a8167fd.tar.bz2 aports-734869763991d8059cc220d1166ad23f9a8167fd.tar.xz |
testing/py-itypes: new aport
-rw-r--r-- | testing/py-itypes/APKBUILD | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/py-itypes/APKBUILD b/testing/py-itypes/APKBUILD new file mode 100644 index 0000000000..880daaa64c --- /dev/null +++ b/testing/py-itypes/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: +pkgname=py-itypes +_pkgreal=${pkgname#*-} +pkgver=1.1.0 +pkgrel=0 +pkgdesc="Basic immutable container types for Python" +url="https://github.com/tomchristie/itypes" +arch="noarch" +license="Unknown" +depends="" +makedepends="python2-dev python3-dev py3-setuptools" +checkdepends="py2-flake8 py3-flake8 py2-pytest py3-pytest py-enum34 + py2-pycodestyle py3-pycodestyle py2-pyflakes py3-pyflakes" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/tomchristie/itypes/archive/$pkgver.tar.gz" +builddir="$srcdir"/$_pkgreal-$pkgver + +build() { + cd "$builddir" + python2 setup.py --quiet build + python3 setup.py --quiet build +} + +package() { + cd "$builddir" + mkdir -p "$pkgdir"/usr/bin +} + +check() { + cd "$builddir" + python2 runtests + python3 runtests +} + +_py2() { + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + local pyver="${1:6:1}" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py --quiet install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="2f6dd5d655f1031059df8dcfd0a2f76875796a800144e887fb66cb5585949097edb6b9f5e973de2280f43cfeb25ab99d3ca428372fe239c8cd70f385304bcdd7 py-itypes-1.1.0.tar.gz" |