aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-ukpostcodeparser
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2019-03-21 10:33:54 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-03-21 10:33:54 +0000
commita0a0a78372524ea00b463dcfe1cc8cc0d4953273 (patch)
treeb9e29c30f5af9076f248449869e5a9676bdf3043 /community/py-ukpostcodeparser
parent4f9d421b63c04f44061610e9f529910551c2d355 (diff)
downloadaports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.bz2
aports-a0a0a78372524ea00b463dcfe1cc8cc0d4953273.tar.xz
py various: move back to community due to py-sqlalchemy move
Diffstat (limited to 'community/py-ukpostcodeparser')
-rw-r--r--community/py-ukpostcodeparser/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/community/py-ukpostcodeparser/APKBUILD b/community/py-ukpostcodeparser/APKBUILD
new file mode 100644
index 0000000000..01a72c2f26
--- /dev/null
+++ b/community/py-ukpostcodeparser/APKBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-ukpostcodeparser
+_pkgname=ukpostcodeparser
+pkgver=1.1.2
+pkgrel=0
+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"