diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 20:17:39 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 20:23:01 +0100 |
commit | 16a94ff98e4dfa17605fa509f727d569a6881087 (patch) | |
tree | e238137e5d47380c4c091c49c38618c1e14f7e44 /community/py-sqlalchemy-migrate | |
parent | 37bacd7008731bc00125be4bf0985ceaf140e629 (diff) | |
download | aports-16a94ff98e4dfa17605fa509f727d569a6881087.tar.bz2 aports-16a94ff98e4dfa17605fa509f727d569a6881087.tar.xz |
community/py-sqlalchemy-migrate: fix conflicts in /usr/bin
Diffstat (limited to 'community/py-sqlalchemy-migrate')
-rw-r--r-- | community/py-sqlalchemy-migrate/APKBUILD | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/community/py-sqlalchemy-migrate/APKBUILD b/community/py-sqlalchemy-migrate/APKBUILD index 3e5dc90624..4e6cc71343 100644 --- a/community/py-sqlalchemy-migrate/APKBUILD +++ b/community/py-sqlalchemy-migrate/APKBUILD @@ -8,7 +8,8 @@ pkgdesc="SQLAlchemy Schema Migration Tools" url="https://github.com/openstack/sqlalchemy-migrate" arch="noarch" license="MIT" -depends="py-sqlalchemy py-decorator py-six py-sqlparse py-tempita py-pbr" +_pydepends="py-sqlalchemy py-decorator py-six py-sqlparse py-tempita py-pbr" +depends="py3-${pkgname#py-}" 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" @@ -21,7 +22,11 @@ build() { } package() { - mkdir -p "$pkgdir" + mkdir -p "$pkgdir"/usr/bin + + local name; for name in migrate migrate-repository; do + ln -s sqlalchemy-$name-3 "$pkgdir"/usr/bin/sqlalchemy-$name || return 1 + done } _py2() { @@ -37,12 +42,18 @@ _py3() { _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 install --prefix=/usr --root="$subpkgdir" + $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 + + cd "$subpkgdir"/usr/bin + local file; for file in *; do + mv "$file" "sqlalchemy-$file-$pyver" || return 1 + done } md5sums="415698033227a88ce7575b8d0b7334a3 py-sqlalchemy-migrate-0.10.0.tar.gz" |