From 766d69327fd2d3713c8716ee70e7f431d25709fb Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Tue, 11 Nov 2014 23:11:11 +0100 Subject: [PATCH] python-pyscss: update to 1.3.2; add python3.4 subpkg --- srcpkgs/python-pyscss/template | 57 +++++++++++++++++++++++++++------- srcpkgs/python3.4-pyscss | 1 + 2 files changed, 47 insertions(+), 11 deletions(-) create mode 120000 srcpkgs/python3.4-pyscss diff --git a/srcpkgs/python-pyscss/template b/srcpkgs/python-pyscss/template index 5899de4cc2..850bf7b2ff 100644 --- a/srcpkgs/python-pyscss/template +++ b/srcpkgs/python-pyscss/template @@ -1,20 +1,55 @@ # Template file for 'python-pyscss' pkgname=python-pyscss -version=1.2.0 -revision=2 +version=1.3.2 +revision=1 wrksrc="pyScss-${version}" -build_style="python-module" -hostmakedepends="python-setuptools" -makedepends="pcre-devel python-devel python-six" -depends="python python-six" +python_versions="2.7 3.4" +hostmakedepends="python-setuptools python3.4-setuptools pcre-devel" +makedepends="pcre-devel python-devel python3.4-devel" +depends="python-six python-enum34 python-pathlib" pycompile_module="scss" -short_desc="A Scss compiler for Python" +short_desc="Scss compiler for Python2" maintainer="Steven R " homepage="http://github.com/Kronuz/pyScss" license="MIT" -distfiles="https://github.com/Kronuz/pyScss/archive/v${version}.tar.gz" -checksum=54f529f0dbecc82c4ce81531f6d8c3b804d0ffaf50574420cbd9ff19f69653a2 +distfiles="${PYPI_SITE}/p/pyScss/pyScss-${version}.tar.gz" +checksum=196289e4e6e44505a097e1e7270e9c1bb918717256d5f4cf104f906ec789dfc7 -post_install() { - vlicense LICENSE +post_extract() { + sed -i '/^#!\//,1d' scss/tool.py + 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,pyscss =,pyscss3 =,' 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-pyscss_package() { + depends="python3.4-six" + pycompile_version="3.4" + pycompile_module="scss" + short_desc="${short_desc/Python2/Python3.4}" + pkg_install() { + vmove usr/bin/pyscss3 + vmove usr/lib/python3.4 + } } diff --git a/srcpkgs/python3.4-pyscss b/srcpkgs/python3.4-pyscss new file mode 120000 index 0000000000..95d23879e1 --- /dev/null +++ b/srcpkgs/python3.4-pyscss @@ -0,0 +1 @@ +python-pyscss \ No newline at end of file