summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/core/python_modules/python-setuptools/PKGBUILD70
-rw-r--r--abs/core/python_modules/python-setuptools/__changelog1
2 files changed, 71 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-setuptools/PKGBUILD b/abs/core/python_modules/python-setuptools/PKGBUILD
new file mode 100644
index 0000000..44701e9
--- /dev/null
+++ b/abs/core/python_modules/python-setuptools/PKGBUILD
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+
+pkgbase=python-setuptools
+pkgname=('python2-setuptools')
+pkgver=3.4.4
+pkgrel=1
+pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
+arch=('any')
+license=('PSF')
+url="http://pypi.python.org/pypi/setuptools"
+makedepends=('python2')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("http://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz")
+md5sums=('6ca9e8377b65233c2ff3a1752406a22d')
+
+check() {
+ # Disabled python 3.x tests for setuptools 3.4.1:
+ # https://bitbucket.org/pypa/setuptools/issue/180/34-release-fails-tests
+
+ # Check python3 module
+ cd "${srcdir}"/setuptools-${pkgver}
+ #python3 setup.py test
+
+ # Check python2 module
+ cd "${srcdir}"/setuptools-${pkgver}-python2
+ python2 setup.py test
+}
+
+prepare() {
+ cp -a setuptools-${pkgver}{,-python2}
+
+ cd "${srcdir}"/setuptools-${pkgver}
+ sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py
+ sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py
+
+ cd "${srcdir}"/setuptools-${pkgver}-python2
+ sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py
+ sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python2|" setuptools/command/easy_install.py
+}
+
+build() {
+ # Build python 3 module
+ #cd "${srcdir}"/setuptools-${pkgver}
+ #python3 setup.py build
+
+ # Build python 2 module
+ cd "${srcdir}"/setuptools-${pkgver}-python2
+ python2 setup.py build
+}
+
+#package_python-setuptools() {
+ #depends=('python>=3.4')
+ #provides=('python-distribute')
+ #replaces=('python-distribute')
+
+ #cd "${srcdir}/setuptools-${pkgver}"
+ #python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+#}
+
+package_python2-setuptools() {
+ depends=('python2>=2.7')
+ provides=('python2-distribute' 'setuptools')
+ replaces=('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"
+}
diff --git a/abs/core/python_modules/python-setuptools/__changelog b/abs/core/python_modules/python-setuptools/__changelog
new file mode 100644
index 0000000..9715c21
--- /dev/null
+++ b/abs/core/python_modules/python-setuptools/__changelog
@@ -0,0 +1 @@
+PKGBUILD - comment out all python 3 stuff and only build for py 2