void-packages/srcpkgs/python-virtualenv/template
2015-01-04 12:48:45 +01:00

61 lines
1.5 KiB
Text

# Template file for 'python-virtualenv'
pkgname=python-virtualenv
version=12.0.5
revision=1
noarch=yes
wrksrc="virtualenv-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
depends="python"
pycompile_module="virtualenv.py"
short_desc="Virtual Python2 environment builder"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://virtualenv.pypa.io/"
license="MIT"
distfiles="${PYPI_SITE}/v/virtualenv/virtualenv-${version}.tar.gz"
checksum=c2cb6cb3536cff6be514f92b03af10128a7d5448bbb35f528e64facc37abde73
post_extract() {
cp -a ${wrksrc} /tmp/virtualenv-2.7
cp -a ${wrksrc} /tmp/virtualenv-3.4
mv /tmp/virtualenv-{2.7,3.4} ${wrksrc}
}
pre_build() {
cd ${wrksrc}/virtualenv-3.4
sed -i 's,virtualenv=,virtualenv3=,' setup.py
sed -i 's,#!/usr/bin/env python,&3.4,' virtualenv.py
}
do_build() {
cd ${wrksrc}/virtualenv-2.7
python setup.py build
cd ${wrksrc}/virtualenv-3.4
python3.4 setup.py build
}
do_install() {
cd ${wrksrc}/virtualenv-2.7
python setup.py install --root=${DESTDIR}
cd ${wrksrc}/virtualenv-3.4
python3.4 setup.py install --root=${DESTDIR}
vlicense LICENSE.txt
}
python3.4-virtualenv_package() {
noarch=yes
depends="python3.4"
pycompile_version="3.4"
pycompile_module="virtualenv.py"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/bin/virtualenv-3.4
vmove usr/bin/virtualenv3
vmove usr/lib/python3.4
vlicense ${wrksrc}/LICENSE.txt
}
}