From c828d598302b5569b6edcce7cd0aef7c77e11c95 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Wed, 14 Jan 2015 16:01:00 +0100 Subject: [PATCH] python-sqlalchemy-migrate: update to 0.9.4 --- .../patches/python3-compat.patch | 17 +++++++++ srcpkgs/python-sqlalchemy-migrate/template | 36 ++++++++----------- 2 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 srcpkgs/python-sqlalchemy-migrate/patches/python3-compat.patch diff --git a/srcpkgs/python-sqlalchemy-migrate/patches/python3-compat.patch b/srcpkgs/python-sqlalchemy-migrate/patches/python3-compat.patch new file mode 100644 index 00000000000..4c84341f387 --- /dev/null +++ b/srcpkgs/python-sqlalchemy-migrate/patches/python3-compat.patch @@ -0,0 +1,17 @@ +--- migrate/versioning/migrate_repository.py ++++ migrate/versioning/migrate_repository.py +@@ -13,12 +13,12 @@ + + def usage(): + """Gives usage information.""" +- print """Usage: %(prog)s repository-to-migrate ++ print("""Usage: %(prog)s repository-to-migrate + + Upgrade your repository to the new flat format. + + NOTE: You should probably make a backup before running this. +- """ % {'prog': sys.argv[0]} ++ """ % {'prog': sys.argv[0]}) + + sys.exit(1) + diff --git a/srcpkgs/python-sqlalchemy-migrate/template b/srcpkgs/python-sqlalchemy-migrate/template index ee2b5d4bf44..8ffd1d596fa 100644 --- a/srcpkgs/python-sqlalchemy-migrate/template +++ b/srcpkgs/python-sqlalchemy-migrate/template @@ -1,12 +1,11 @@ # Template file for 'python-sqlalchemy-migrate' pkgname=python-sqlalchemy-migrate -version=0.9.2 +version=0.9.4 revision=1 noarch=yes wrksrc="${pkgname#*-}-${version}" python_versions="2.7 3.4" 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)" @@ -14,38 +13,33 @@ maintainer="Alessio Sergi " homepage="https://github.com/stackforge/sqlalchemy-migrate" license="MIT" 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} -} +checksum=b3a35ee95196d72483bf821f60a1e784d77da9d6baed5e6ccdaffbfa7e87cd8e 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,' {} + + 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,' {} + } do_build() { - cd ${wrksrc}/python2.7-build + cd ${wrksrc}/migrate-2.7 python setup.py build - cd ${wrksrc}/python3.4-build + cd ${wrksrc}/migrate-3.4 python3.4 setup.py build } do_install() { - cd ${wrksrc}/python2.7-build + cd ${wrksrc}/migrate-2.7 python setup.py install --root=${DESTDIR} - - cd ${wrksrc}/python3.4-build - python3.4 setup.py install --root=${DESTDIR} -} - -post_install() { vlicense COPYING LICENSE + + cd ${wrksrc}/migrate-3.4 + python3.4 setup.py install --root=${DESTDIR} } python3.4-sqlalchemy-migrate_package() {