void-packages/srcpkgs/python-pyscss/template
2014-11-21 13:25:32 +01:00

55 lines
1.3 KiB
Text

# Template file for 'python-pyscss'
pkgname=python-pyscss
version=1.3.3
revision=1
wrksrc="pyScss-${version}"
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="Scss compiler for Python2"
maintainer="Steven R <dev@styez.com>"
homepage="http://github.com/Kronuz/pyScss"
license="MIT"
distfiles="${PYPI_SITE}/p/pyScss/pyScss-${version}.tar.gz"
checksum=dd1e1262ba18a77e8acacfe2088efba63db2111fe65690b7ff37094d5d2ffadc
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
}
}