python-virtualenv-clone: use alternatives
This commit is contained in:
parent
b1a7eca93b
commit
a1ab19f385
srcpkgs/python-virtualenv-clone
|
@ -1,11 +1,11 @@
|
||||||
# Template file for 'python-virtualenv-clone'
|
# Template file for 'python-virtualenv-clone'
|
||||||
pkgname=python-virtualenv-clone
|
pkgname=python-virtualenv-clone
|
||||||
version=0.2.6
|
version=0.2.6
|
||||||
revision=1
|
revision=2
|
||||||
noarch=yes
|
noarch=yes
|
||||||
wrksrc="${pkgname#*-}-${version}"
|
wrksrc="${pkgname#*-}-${version}"
|
||||||
python_versions="2.7 3.4"
|
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
|
python_versions="2.7 3.4"
|
||||||
hostmakedepends="python-setuptools python3.4-setuptools"
|
hostmakedepends="python-setuptools python3.4-setuptools"
|
||||||
depends="python-setuptools"
|
depends="python-setuptools"
|
||||||
pycompile_module="clonevirtualenv.py"
|
pycompile_module="clonevirtualenv.py"
|
||||||
|
@ -15,27 +15,9 @@ homepage="https://github.com/edwardgeorge/virtualenv-clone"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
distfiles="${PYPI_SITE}/v/${pkgname#*-}/${pkgname#*-}-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/v/${pkgname#*-}/${pkgname#*-}-${version}.tar.gz"
|
||||||
checksum=6b3be5cab59e455f08c9eda573d23006b7d6fb41fae974ddaa2b275c93cc4405
|
checksum=6b3be5cab59e455f08c9eda573d23006b7d6fb41fae974ddaa2b275c93cc4405
|
||||||
|
alternatives="virtualenv-clone:virtualenv-clone:/usr/bin/virtualenv-clone2.7"
|
||||||
|
|
||||||
pre_build() {
|
post_install() {
|
||||||
cp -a ${wrksrc} /tmp/${pkgname#*-}-2.7
|
|
||||||
cp -a ${wrksrc} /tmp/${pkgname#*-}-3.4
|
|
||||||
mv /tmp/${pkgname#*-}-{2.7,3.4} ${wrksrc}
|
|
||||||
|
|
||||||
cd ${pkgname#*-}-3.4
|
|
||||||
sed -i 's,\(virtualenv-clone\)=,\13=,' setup.py
|
|
||||||
sed -i 's,#!/usr/bin/env python,&3.4,' clonevirtualenv.py
|
|
||||||
}
|
|
||||||
do_build() {
|
|
||||||
for pyver in $python_versions; do
|
|
||||||
cd ${wrksrc}/${pkgname#*-}-${pyver}
|
|
||||||
python${pyver} setup.py build
|
|
||||||
done
|
|
||||||
}
|
|
||||||
do_install() {
|
|
||||||
for pyver in $python_versions; do
|
|
||||||
cd ${wrksrc}/${pkgname#*-}-${pyver}
|
|
||||||
python${pyver} setup.py install --root=${DESTDIR}
|
|
||||||
done
|
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +27,9 @@ python3.4-virtualenv-clone_package() {
|
||||||
pycompile_version="3.4"
|
pycompile_version="3.4"
|
||||||
pycompile_module="clonevirtualenv.py"
|
pycompile_module="clonevirtualenv.py"
|
||||||
short_desc="${short_desc/Python2/Python3.4}"
|
short_desc="${short_desc/Python2/Python3.4}"
|
||||||
|
alternatives="virtualenv-clone:virtualenv-clone:/usr/bin/virtualenv-clone3.4"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/bin/virtualenv-clone3
|
vmove usr/bin/virtualenv-clone3.4
|
||||||
vmove usr/lib/python3.4
|
vmove usr/lib/python3.4
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue