2014-07-05 22:17:00 +00:00
|
|
|
# Template file for 'python-virtualenv'
|
|
|
|
pkgname=python-virtualenv
|
2015-01-04 11:48:45 +00:00
|
|
|
version=12.0.5
|
2014-07-05 22:17:00 +00:00
|
|
|
revision=1
|
|
|
|
noarch=yes
|
2014-12-30 11:14:00 +00:00
|
|
|
wrksrc="virtualenv-${version}"
|
2014-07-05 22:17:00 +00:00
|
|
|
build_style=python-module
|
2014-12-30 11:14:00 +00:00
|
|
|
python_versions="2.7 3.4"
|
2014-07-05 22:17:00 +00:00
|
|
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
2015-01-04 11:48:45 +00:00
|
|
|
depends="python"
|
2014-07-05 22:17:00 +00:00
|
|
|
pycompile_module="virtualenv.py"
|
|
|
|
short_desc="Virtual Python2 environment builder"
|
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
|
|
homepage="https://virtualenv.pypa.io/"
|
|
|
|
license="MIT"
|
2014-12-30 11:14:00 +00:00
|
|
|
distfiles="${PYPI_SITE}/v/virtualenv/virtualenv-${version}.tar.gz"
|
2015-01-04 11:48:45 +00:00
|
|
|
checksum=c2cb6cb3536cff6be514f92b03af10128a7d5448bbb35f528e64facc37abde73
|
2014-07-05 22:17:00 +00:00
|
|
|
|
|
|
|
post_extract() {
|
2014-12-30 11:14:00 +00:00
|
|
|
cp -a ${wrksrc} /tmp/virtualenv-2.7
|
|
|
|
cp -a ${wrksrc} /tmp/virtualenv-3.4
|
|
|
|
mv /tmp/virtualenv-{2.7,3.4} ${wrksrc}
|
2014-07-05 22:17:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pre_build() {
|
2014-12-30 11:14:00 +00:00
|
|
|
cd ${wrksrc}/virtualenv-3.4
|
2014-07-05 22:17:00 +00:00
|
|
|
sed -i 's,virtualenv=,virtualenv3=,' setup.py
|
|
|
|
sed -i 's,#!/usr/bin/env python,&3.4,' virtualenv.py
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2014-12-30 11:14:00 +00:00
|
|
|
cd ${wrksrc}/virtualenv-2.7
|
2014-07-05 22:17:00 +00:00
|
|
|
python setup.py build
|
|
|
|
|
2014-12-30 11:14:00 +00:00
|
|
|
cd ${wrksrc}/virtualenv-3.4
|
2014-07-05 22:17:00 +00:00
|
|
|
python3.4 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2014-12-30 11:14:00 +00:00
|
|
|
cd ${wrksrc}/virtualenv-2.7
|
2014-07-05 22:17:00 +00:00
|
|
|
python setup.py install --root=${DESTDIR}
|
|
|
|
|
2014-12-30 11:14:00 +00:00
|
|
|
cd ${wrksrc}/virtualenv-3.4
|
2014-07-05 22:17:00 +00:00
|
|
|
python3.4 setup.py install --root=${DESTDIR}
|
|
|
|
|
2014-12-30 11:14:00 +00:00
|
|
|
vlicense LICENSE.txt
|
2014-07-05 22:17:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-virtualenv_package() {
|
|
|
|
noarch=yes
|
2015-01-04 11:48:45 +00:00
|
|
|
depends="python3.4"
|
2014-07-05 22:17:00 +00:00
|
|
|
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
|
2014-12-30 11:14:00 +00:00
|
|
|
vlicense ${wrksrc}/LICENSE.txt
|
2014-07-05 22:17:00 +00:00
|
|
|
}
|
|
|
|
}
|