diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 15:57:03 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 16:09:48 -0300 |
commit | ff15806109bade9ae4d666069a0a2245d77172d1 (patch) | |
tree | f3e5b822546591daa75955efc94f453e6d0f904e /community/py3-ukpostcodeparser | |
parent | 72aeafd82fe76d58a3d5da45724867aaea04b6ec (diff) | |
download | aports-ff15806109bade9ae4d666069a0a2245d77172d1.tar.bz2 aports-ff15806109bade9ae4d666069a0a2245d77172d1.tar.xz |
community/py3-ukpostcodeparser: rename from py-ukpostcodeparser
Diffstat (limited to 'community/py3-ukpostcodeparser')
-rw-r--r-- | community/py3-ukpostcodeparser/APKBUILD | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/community/py3-ukpostcodeparser/APKBUILD b/community/py3-ukpostcodeparser/APKBUILD new file mode 100644 index 0000000000..7fa0d32cb2 --- /dev/null +++ b/community/py3-ukpostcodeparser/APKBUILD @@ -0,0 +1,57 @@ +# Maintainer: Drew DeVault <sir@cmpwn.com> +pkgname=py-ukpostcodeparser +_pkgname=ukpostcodeparser +pkgver=1.1.2 +pkgrel=1 +pkgdesc="UK Postcode parser" +url=https://github.com/hamstah/ukpostcodeparser +arch=noarch +license=MIT +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +makedepends="py-setuptools python2-dev python3-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/hamstah/$_pkgname/archive/v$pkgver.tar.gz" +builddir=$srcdir/$_pkgname-$pkgver +# tests broken upstream: https://github.com/hamstah/ukpostcodeparser/issues/8 +options="!check" + +prepare() { + cp -r "$builddir" "$builddir"-py3 +} + +build() { + cd "$builddir" + python2 setup.py build + cd "$builddir"-py3 + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py test + cd "$builddir"-py3 + python3 setup.py test +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + cd "$builddir" + _py python2 +} + +_py3() { + cd "$builddir"-py3 + _py python3 +} + +_py() { + python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="8113522b728c095f937a9f53f21c369130e3e63c4fc3546dbea4ad1c53648742fb0e766b1254c76ee65d69dec585f1a90caa7d39ca540de1765ff5f989a702de py-ukpostcodeparser-1.1.2.tar.gz" |