mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-06 23:23:51 +02:00
python-sqlalchemy-migrate: use alternatives
This commit is contained in:
parent
2ca449a39a
commit
b45bb2e3b7
1 changed files with 10 additions and 23 deletions
|
@ -1,9 +1,10 @@
|
||||||
# Template file for 'python-sqlalchemy-migrate'
|
# Template file for 'python-sqlalchemy-migrate'
|
||||||
pkgname=python-sqlalchemy-migrate
|
pkgname=python-sqlalchemy-migrate
|
||||||
version=0.10.0
|
version=0.10.0
|
||||||
revision=1
|
revision=2
|
||||||
noarch=yes
|
noarch=yes
|
||||||
wrksrc="${pkgname#*-}-${version}"
|
wrksrc="${pkgname#*-}-${version}"
|
||||||
|
build_style=python-module
|
||||||
python_versions="2.7 3.4"
|
python_versions="2.7 3.4"
|
||||||
hostmakedepends="python-setuptools python3.4-setuptools python-pbr python3.4-pbr"
|
hostmakedepends="python-setuptools python3.4-setuptools python-pbr python3.4-pbr"
|
||||||
depends="python-pbr python-SQLAlchemy python-decorator python-six python-sqlparse python-tempita"
|
depends="python-pbr python-SQLAlchemy python-decorator python-six python-sqlparse python-tempita"
|
||||||
|
@ -15,32 +16,18 @@ license="MIT"
|
||||||
distfiles="${PYPI_SITE}/s/sqlalchemy-migrate/sqlalchemy-migrate-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/s/sqlalchemy-migrate/sqlalchemy-migrate-${version}.tar.gz"
|
||||||
checksum=f83c5cce9c09e5c05527279b7fe1565b32e5353342ff30b24f594fa2e5a7e003
|
checksum=f83c5cce9c09e5c05527279b7fe1565b32e5353342ff30b24f594fa2e5a7e003
|
||||||
|
|
||||||
pre_build() {
|
alternatives="
|
||||||
cp -a ${wrksrc} /tmp/migrate-2.7
|
migrate:migrate-repository:/usr/bin/migrate-repository2.7
|
||||||
cp -a ${wrksrc} /tmp/migrate-3.4
|
migrate:migrate:/usr/bin/migrate2.7"
|
||||||
mv /tmp/migrate-{2.7,3.4} ${wrksrc}
|
|
||||||
|
|
||||||
cd ${wrksrc}/migrate-3.4
|
post_install() {
|
||||||
sed -i 's,\(migrate\) =,\13 =,;s,\(migrate-repository\) =,\13 =,' setup.cfg
|
|
||||||
find migrate -type f -name '*.py' -exec sed -i '/^#!/s,python$,&3.4,' {} +
|
|
||||||
}
|
|
||||||
|
|
||||||
do_build() {
|
|
||||||
for pyver in $python_versions; do
|
|
||||||
cd ${wrksrc}/migrate-${pyver}
|
|
||||||
python${pyver} setup.py build
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
for pyver in $python_versions; do
|
|
||||||
cd ${wrksrc}/migrate-${pyver}
|
|
||||||
python${pyver} setup.py install --root=${DESTDIR}
|
|
||||||
done
|
|
||||||
vlicense COPYING LICENSE
|
vlicense COPYING LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
python3.4-sqlalchemy-migrate_package() {
|
python3.4-sqlalchemy-migrate_package() {
|
||||||
|
alternatives="
|
||||||
|
migrate:migrate-repository:/usr/bin/migrate-repository3.4
|
||||||
|
migrate:migrate:/usr/bin/migrate3.4"
|
||||||
noarch=yes
|
noarch=yes
|
||||||
depends="python3.4-pbr python3.4-SQLAlchemy python3.4-decorator python3.4-six
|
depends="python3.4-pbr python3.4-SQLAlchemy python3.4-decorator python3.4-six
|
||||||
python3.4-sqlparse python3.4-tempita"
|
python3.4-sqlparse python3.4-tempita"
|
||||||
|
@ -48,7 +35,7 @@ python3.4-sqlalchemy-migrate_package() {
|
||||||
pycompile_module="migrate"
|
pycompile_module="migrate"
|
||||||
short_desc="${short_desc/Python2/Python3.4}"
|
short_desc="${short_desc/Python2/Python3.4}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/migrate*3
|
vmove usr/bin/*3.4
|
||||||
vmove usr/lib/python3.4
|
vmove usr/lib/python3.4
|
||||||
vlicense COPYING LICENSE
|
vlicense COPYING LICENSE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue