void-packages/srcpkgs/python-sqlalchemy-migrate/template

64 lines
1.8 KiB
Text
Raw Normal View History

# Template file for 'python-sqlalchemy-migrate'
pkgname=python-sqlalchemy-migrate
2014-11-11 22:23:32 +00:00
version=0.9.2
revision=1
noarch=yes
wrksrc="${pkgname#*-}-${version}"
python_versions="2.7 3.4"
2014-11-11 22:23:32 +00:00
hostmakedepends="python-setuptools python3.4-setuptools python-pbr python3.4-pbr"
makedepends="python-pbr python3.4-pbr"
depends="python-pbr python-SQLAlchemy python-decorator python-six python-sqlparse python-tempita"
pycompile_module="migrate"
short_desc="Database schema migration for SQLAlchemy (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/stackforge/sqlalchemy-migrate"
license="MIT"
2014-11-11 22:23:32 +00:00
distfiles="${PYPI_SITE}/s/sqlalchemy-migrate/sqlalchemy-migrate-${version}.tar.gz"
checksum=578fa857615f05f9c73f024147c75019535d3d276ca46f5ec84cc0d606820893
post_extract() {
cp -a ${wrksrc} /tmp/python2.7-build
cp -a ${wrksrc} /tmp/python3.4-build
mv /tmp/python{2.7,3.4}-build ${wrksrc}
}
pre_build() {
cd ${wrksrc}/python3.4-build
sed -i 's,migrate =,migrate3 =,;s,migrate-repository =,migrate-repository3 =,' setup.cfg
find . -type f -name '*.py' -exec sed -i -e '/^#!/s,python$,&3.4,' {} +
}
do_build() {
cd ${wrksrc}/python2.7-build
python setup.py build
cd ${wrksrc}/python3.4-build
python3.4 setup.py build
}
do_install() {
cd ${wrksrc}/python2.7-build
python setup.py install --root=${DESTDIR}
cd ${wrksrc}/python3.4-build
python3.4 setup.py install --root=${DESTDIR}
}
post_install() {
vlicense COPYING LICENSE
}
python3.4-sqlalchemy-migrate_package() {
noarch=yes
2014-11-11 22:23:32 +00:00
depends="python3.4-pbr python3.4-SQLAlchemy python3.4-decorator python3.4-six
python3.4-sqlparse python3.4-tempita"
pycompile_version="3.4"
pycompile_module="migrate"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/migrate*3
vmove usr/lib/python3.4
vlicense ${wrksrc}/COPYING LICENSE
}
}