2013-08-31 09:07:55 +00:00
|
|
|
# Template file for 'python-setuptools'
|
|
|
|
pkgname=python-setuptools
|
2014-12-18 17:18:00 +00:00
|
|
|
version=8.2
|
2014-10-22 05:44:00 +00:00
|
|
|
revision=1
|
2014-07-13 15:13:00 +00:00
|
|
|
noarch=yes
|
2014-10-05 10:56:00 +00:00
|
|
|
wrksrc="setuptools-${version}"
|
2014-07-13 15:13:00 +00:00
|
|
|
python_versions="2.7 3.4"
|
2014-06-17 10:00:00 +00:00
|
|
|
hostmakedepends="python-devel python3.4-devel"
|
2014-07-13 15:13:00 +00:00
|
|
|
depends="python"
|
2014-01-01 15:10:11 +00:00
|
|
|
pycompile_module="easy_install.py pkg_resources.py _markerlib setuptools"
|
|
|
|
provides="python-distribute-${version}_1"
|
|
|
|
replaces="python-distribute>=0"
|
2014-06-17 10:00:00 +00:00
|
|
|
short_desc="Easily download, build, install, upgrade, and uninstall Python2 packages"
|
|
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
2014-08-15 22:33:33 +00:00
|
|
|
homepage="https://pypi.python.org/pypi/setuptools"
|
2013-08-31 09:07:55 +00:00
|
|
|
license="PSF"
|
2014-10-05 10:56:00 +00:00
|
|
|
distfiles="${PYPI_SITE}/s/setuptools/setuptools-${version}.tar.gz"
|
2014-12-18 17:18:00 +00:00
|
|
|
checksum=20417472ac8b93831819a5e1baa8f4691fab6d9f805d4d673b65d504dcf8d672
|
2014-06-17 10:00:00 +00:00
|
|
|
|
2014-08-15 22:33:33 +00:00
|
|
|
post_extract() {
|
|
|
|
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,easy_install =,easy_install3 =,' setup.py
|
|
|
|
sed -i 's,#!/usr/bin/env python,&3.4,' setuptools/command/easy_install.py
|
|
|
|
sed -i 's,#!/usr/bin/python,&3.4,' setuptools/tests/test_resources.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}
|
2014-06-17 10:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-setuptools_package() {
|
2014-07-13 15:13:00 +00:00
|
|
|
noarch=yes
|
2014-06-17 10:00:00 +00:00
|
|
|
depends="python3.4"
|
2014-06-18 09:50:00 +00:00
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="easy_install.py pkg_resources.py _markerlib setuptools"
|
2014-08-15 22:33:33 +00:00
|
|
|
short_desc="${short_desc/Python2/Python3.4}"
|
2014-06-17 10:00:00 +00:00
|
|
|
provides="python3-distribute-${version}_1"
|
|
|
|
replaces="python3-distribute>=0"
|
|
|
|
pkg_install() {
|
2014-07-13 15:13:00 +00:00
|
|
|
vmove usr/bin/easy_install-3.4
|
|
|
|
vmove usr/bin/easy_install3
|
|
|
|
vmove usr/lib/python3.4
|
2014-06-17 10:00:00 +00:00
|
|
|
}
|
|
|
|
}
|