diff --git a/srcpkgs/python-Babel/template b/srcpkgs/python-Babel/template new file mode 100644 index 00000000000..605854a75d9 --- /dev/null +++ b/srcpkgs/python-Babel/template @@ -0,0 +1,58 @@ +# Template file for 'python-Babel' +pkgname=python-Babel +version=1.3 +revision=1 +noarch=yes +wrksrc="${pkgname#*-}-${version}" +python_versions="2.7 3.4" +build_style=python-module +hostmakedepends="python-setuptools python3.4-setuptools" +makedepends="python-devel python3.4-devel python-pytz python3.4-pytz" +depends="python python-pytz" +replaces="python-babel>=0" +pycompile_module="babel" +short_desc="Tools for internationalizing Python applications (Python2)" +maintainer="Alessio Sergi " +homepage="http://babel.pocoo.org/" +license="BSD" +distfiles="https://pypi.python.org/packages/source/B/${pkgname#*-}/${pkgname#*-}-${version}.tar.gz" +checksum=9f02d0357184de1f093c10012b52e7454a1008be6a5c185ab7a3307aceb1d12e + +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,pybabel,pybabel3,' setup.py +} + +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} +} + +python3.4-Babel_package() { + noarch=yes + depends="python3.4 python3.4-pytz" + pycompile_version="3.4" + pycompile_module="babel" + short_desc="${short_desc/Python2/Python3.4}" + pkg_install() { + vmove usr/bin/pybabel3 + vmove usr/lib/python3.4 + } +} diff --git a/srcpkgs/python-babel/template b/srcpkgs/python-babel/template deleted file mode 100644 index 22664c19fb4..00000000000 --- a/srcpkgs/python-babel/template +++ /dev/null @@ -1,15 +0,0 @@ -# Template file for 'python-babel' -pkgname=python-babel -version=0.9.6 -revision=2 -noarch=yes -wrksrc="Babel-${version}" -build_style=python-module -makedepends="python-devel python-distribute" -pycompile_module="babel" -short_desc="A collection of tools for internationalizing Python applications" -maintainer="Juan RP " -homepage="http://babel.edgewall.org/" -license="BSD" -distfiles="http://ftp.edgewall.com/pub/babel/Babel-${version}.tar.gz" -checksum=4a3a085ecf1fcd2736573538ffa114f1f4331b3bbbdd69381e6e172c49c9750f diff --git a/srcpkgs/python3.4-Babel b/srcpkgs/python3.4-Babel new file mode 120000 index 00000000000..d4dcb8aac70 --- /dev/null +++ b/srcpkgs/python3.4-Babel @@ -0,0 +1 @@ +python-Babel \ No newline at end of file