2014-08-05 02:45:05 +02:00
|
|
|
# Template file for 'python-sqlalchemy-migrate'
|
|
|
|
pkgname=python-sqlalchemy-migrate
|
2015-01-14 16:01:00 +01:00
|
|
|
version=0.9.4
|
2014-08-05 02:45:05 +02:00
|
|
|
revision=1
|
|
|
|
noarch=yes
|
|
|
|
wrksrc="${pkgname#*-}-${version}"
|
|
|
|
python_versions="2.7 3.4"
|
2014-11-11 23:23:32 +01:00
|
|
|
hostmakedepends="python-setuptools python3.4-setuptools python-pbr python3.4-pbr"
|
|
|
|
depends="python-pbr python-SQLAlchemy python-decorator python-six python-sqlparse python-tempita"
|
2014-08-05 02:45:05 +02:00
|
|
|
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 23:23:32 +01:00
|
|
|
distfiles="${PYPI_SITE}/s/sqlalchemy-migrate/sqlalchemy-migrate-${version}.tar.gz"
|
2015-01-14 16:01:00 +01:00
|
|
|
checksum=b3a35ee95196d72483bf821f60a1e784d77da9d6baed5e6ccdaffbfa7e87cd8e
|
2014-08-05 02:45:05 +02:00
|
|
|
|
|
|
|
pre_build() {
|
2015-01-14 16:01:00 +01:00
|
|
|
cp -a ${wrksrc} /tmp/migrate-2.7
|
|
|
|
cp -a ${wrksrc} /tmp/migrate-3.4
|
|
|
|
mv /tmp/migrate-{2.7,3.4} ${wrksrc}
|
|
|
|
|
|
|
|
cd ${wrksrc}/migrate-3.4
|
|
|
|
sed -i 's,\(migrate\) =,\13 =,;s,\(migrate-repository\) =,\13 =,' setup.cfg
|
|
|
|
find . -type f -name '*.py' -exec sed -i '/^#!/s,python$,&3.4,' {} +
|
2014-08-05 02:45:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2015-01-14 16:01:00 +01:00
|
|
|
cd ${wrksrc}/migrate-2.7
|
2014-08-05 02:45:05 +02:00
|
|
|
python setup.py build
|
|
|
|
|
2015-01-14 16:01:00 +01:00
|
|
|
cd ${wrksrc}/migrate-3.4
|
2014-08-05 02:45:05 +02:00
|
|
|
python3.4 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2015-01-14 16:01:00 +01:00
|
|
|
cd ${wrksrc}/migrate-2.7
|
2014-08-05 02:45:05 +02:00
|
|
|
python setup.py install --root=${DESTDIR}
|
2015-01-14 16:01:00 +01:00
|
|
|
vlicense COPYING LICENSE
|
2014-08-05 02:45:05 +02:00
|
|
|
|
2015-01-14 16:01:00 +01:00
|
|
|
cd ${wrksrc}/migrate-3.4
|
2014-08-05 02:45:05 +02:00
|
|
|
python3.4 setup.py install --root=${DESTDIR}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-sqlalchemy-migrate_package() {
|
|
|
|
noarch=yes
|
2014-11-11 23:23:32 +01:00
|
|
|
depends="python3.4-pbr python3.4-SQLAlchemy python3.4-decorator python3.4-six
|
|
|
|
python3.4-sqlparse python3.4-tempita"
|
2014-08-05 02:45:05 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|