# Contributor: Andrew Manison # Maintainer: Fabian Affolter pkgname=py-setuptools _pkgname=${pkgname#py-} pkgver=40.8.0 pkgrel=1 pkgdesc="A collection of enhancements to the Python distutils" url="https://pypi.python.org/pypi/setuptools" arch="noarch" license="PSF" depends="python2" makedepends="python2-dev python3-dev" provides="py2-setuptools=$pkgver-r$pkgrel" options="!check" #no testsuite subpackages="py3-$_pkgname:_py3" source="$_pkgname-$pkgver.tar.gz::https://github.com/pypa/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver prepare() { cd "$builddir" python2 bootstrap.py python3 bootstrap.py } build() { cd "$builddir" python2 setup.py build python3 setup.py build } package() { cd "$builddir" python2 setup.py install --prefix=/usr --root="$pkgdir" # we don't provide a non-suffixed easy_install rm -f "$pkgdir"/usr/bin/easy_install } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" # we don't provide a non-suffixed easy_install rm -f "$subpkgdir"/usr/bin/easy_install } _py3() { replaces="python3" _py python3 } sha512sums="95d6fb36276b3fee3d123e7ff8c4e5f7687cb96456a92ae1094fff75c1c5faf84967400c20442fca903c41ccacb00cd85630d550719f59d797d311986f7aaf6b setuptools-40.8.0.tar.gz"