Created
August 12, 2013 11:50
-
-
Save shanipribadi/6210208 to your computer and use it in GitHub Desktop.
PKGBUILD for python-setuptools-0.9.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id$ | |
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org> | |
# Contributor: Sebastien Binet <binet@farnsworth> | |
pkgbase=python-setuptools | |
pkgname=('python-setuptools' 'python2-setuptools') | |
pkgver=0.9.8 | |
pkgrel=1 | |
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages" | |
arch=('any') | |
license=('PSF') | |
url="http://pypi.python.org/pypi/setuptools" | |
makedepends=('python' 'python2') | |
source=(http://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz) | |
sha256sums=('42bf629a4b3a4933bb3cfacf6005c95b7494fd88cd62a7bad1a8c3e64647eb0c') | |
prepare() { | |
cd "${srcdir}" | |
pushd setuptools-${pkgver} | |
popd | |
cp -a setuptools-${pkgver}{,-python2} | |
cd "${srcdir}"/setuptools-${pkgver} | |
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py | |
cd ../setuptools-${pkgver}-python2 | |
sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py | |
} | |
build() { | |
# Build python 3 module | |
cd "${srcdir}"/setuptools-${pkgver} | |
python3 setup.py build | |
# Build python 2 module | |
cd ../setuptools-${pkgver}-python2 | |
python2 setup.py build | |
} | |
package_python-setuptools() { | |
depends=('python>=3.3') | |
provides=('python-distribute') | |
conflicts=('python-distribute') | |
cd "${srcdir}/setuptools-${pkgver}" | |
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build | |
rm "${pkgdir}/usr/bin/easy_install" | |
} | |
package_python2-setuptools() { | |
depends=('python2>=2.7') | |
provides=('python2-distribute' 'setuptools') | |
conflicts=('python2-distribute' 'setuptools') | |
cd "${srcdir}/setuptools-${pkgver}-python2" | |
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build | |
rm "${pkgdir}/usr/bin/easy_install" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment