aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-sqlalchemy-migrate/APKBUILD
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-10 13:31:07 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-19 20:23:01 +0100
commit37bacd7008731bc00125be4bf0985ceaf140e629 (patch)
tree2cbca0cf3c19d8913d5bca3bd4a78983b7c571c4 /community/py-sqlalchemy-migrate/APKBUILD
parent506a7514dfff4ba237f33bdce96a5d1222057cb1 (diff)
downloadaports-37bacd7008731bc00125be4bf0985ceaf140e629.tar.bz2
aports-37bacd7008731bc00125be4bf0985ceaf140e629.tar.xz
community/py-sqlalchemy-migrate: add py2/py3 subpackages and fix deps
Diffstat (limited to 'community/py-sqlalchemy-migrate/APKBUILD')
-rw-r--r--community/py-sqlalchemy-migrate/APKBUILD43
1 files changed, 25 insertions, 18 deletions
diff --git a/community/py-sqlalchemy-migrate/APKBUILD b/community/py-sqlalchemy-migrate/APKBUILD
index 50741c4257..3e5dc90624 100644
--- a/community/py-sqlalchemy-migrate/APKBUILD
+++ b/community/py-sqlalchemy-migrate/APKBUILD
@@ -1,43 +1,50 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-sqlalchemy-migrate
+_pkgname=sqlalchemy-migrate
pkgver=0.10.0
-pkgrel=1
+pkgrel=2
pkgdesc="SQLAlchemy Schema Migration Tools"
-url="https://code.google.com/p/sqlalchemy-migrate/"
+url="https://github.com/openstack/sqlalchemy-migrate"
arch="noarch"
license="MIT"
-depends=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages="py2-${pkgname/py-/}:_py2"
-source="$pkgname-$pkgver.tar.gz::https://github.com/openstack/sqlalchemy-migrate/archive/$pkgver.tar.gz"
-
-builddir="$srcdir"/sqlalchemy-migrate-$pkgver
+depends="py-sqlalchemy py-decorator py-six py-sqlparse py-tempita py-pbr"
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$pkgname-$pkgver.tar.gz::https://github.com/openstack/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
mkdir -p "$pkgdir"
}
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
_py() {
- local python=$1
- pkgdesc="$pkgdesc - $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
+ 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"
}
-_py2() {
- _py python2
- depends="py2-sqlalchemy py2-tempita py2-decorator"
- replaces="$pkgname"
-}
-
md5sums="415698033227a88ce7575b8d0b7334a3 py-sqlalchemy-migrate-0.10.0.tar.gz"
sha256sums="a3b78ae5e9c8021617c75033181f2921629c25f8d1a65cb21ee9fe9a6a97df37 py-sqlalchemy-migrate-0.10.0.tar.gz"
sha512sums="7b94782eb1caa309180e9aff31a1599869d938828796e187e7204719c0e7488eb5ae25ba8ff50d976280f472582e97765cb46796b4223b347350109697a01503 py-sqlalchemy-migrate-0.10.0.tar.gz"