mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 07:02:29 +01:00
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
|
|
pkgname=py-sqlalchemy-migrate
|
|
_pkgname=sqlalchemy-migrate
|
|
pkgver=0.12.0
|
|
pkgrel=1
|
|
pkgdesc="SQLAlchemy Schema Migration Tools"
|
|
url="https://github.com/openstack/sqlalchemy-migrate"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="py3-${pkgname#py-} py-sqlalchemy py-tempita py-decorator py-sqlparse"
|
|
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
|
|
python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
python2 setup.py check
|
|
python3 setup.py check
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/usr/bin
|
|
|
|
local name; for name in migrate migrate-repository; do
|
|
ln -s sqlalchemy-$name-3 "$pkgdir"/usr/bin/sqlalchemy-$name
|
|
done
|
|
}
|
|
|
|
_py2() {
|
|
replaces="$pkgname"
|
|
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 install --prefix=/usr --root="$subpkgdir"
|
|
|
|
cd "$subpkgdir"/usr/bin
|
|
local file; for file in *; do
|
|
mv "$file" "sqlalchemy-$file-$pyver" || return 1
|
|
done
|
|
|
|
rm -Rf "$subpkgdir"/usr/lib/$python*/site-packages/migrate/tests
|
|
}
|
|
|
|
sha512sums="95f3a705bd119ea27b17607c2adfd5f88b979640fe5ed1b309d3aea369b63feb205491e3a8a749a48d62c1b5430aa91658b82faf35f26bd8d95b6c15b2a69fde py-sqlalchemy-migrate-0.12.0.tar.gz"
|