From 15f4a0b4c1d14ef94540a1ba25ade08bfe4fa0aa Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Sun, 16 Jul 2017 02:53:03 +0000 Subject: python-setuptools: update to 36.2.0 --- abs/core/python_modules/python-setuptools/PKGBUILD | 109 ++++++++++++--------- 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/abs/core/python_modules/python-setuptools/PKGBUILD b/abs/core/python_modules/python-setuptools/PKGBUILD index 44701e9..31a941e 100644 --- a/abs/core/python_modules/python-setuptools/PKGBUILD +++ b/abs/core/python_modules/python-setuptools/PKGBUILD @@ -1,70 +1,85 @@ # $Id$ # Maintainer: Angel Velasquez -# Maintainer: Felix Yan +# Maintainer: Felix Yan pkgbase=python-setuptools pkgname=('python2-setuptools') -pkgver=3.4.4 +pkgver=36.2.0 pkgrel=1 +epoch=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 -} - +makedepends=('python2-packaging' 'python2-appdirs' + 'python2-pip') +checkdepends=('python2-pytest-runner' + 'python2-pytest-flake8' 'python2-backports.unittest_mock' 'git') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/pypa/setuptools/archive/v$pkgver.tar.gz") +sha512sums=('579e63feb9f5ea33e29f4ae3a2736a2cfd18e83927775a56553dbe34bcfa32f325457204333d4f183759dbcd57e4ad7f8b166fcfbf626db597b18e14bbcd9ea4') + prepare() { - cp -a setuptools-${pkgver}{,-python2} + # Don't download and install deps + sed -i '/pip.main(args)/d' setuptools-$pkgver/bootstrap.py + + rm -r setuptools-$pkgver/pkg_resources/_vendor + + # Remove post-release tag since we are using stable tags + sed -e '/tag_build = .post/d' \ + -e '/tag_date = 1/d' \ + -i setuptools-$pkgver/setup.cfg - 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 + cp -a setuptools-$pkgver{,-py2} - cd "${srcdir}"/setuptools-${pkgver}-python2 - sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py +# cd "$srcdir"/setuptools-$pkgver +# sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py + + cd "$srcdir"/setuptools-$pkgver-py2 sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python2|" setuptools/command/easy_install.py + sed -i -e "s|'pip'|'pip2'|" setuptools/tests/{test_develop.py,test_namespaces.py} + + export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 } build() { - # Build python 3 module - #cd "${srcdir}"/setuptools-${pkgver} - #python3 setup.py build +# cd "$srcdir"/setuptools-$pkgver +# python bootstrap.py +# python setup.py build - # Build python 2 module - cd "${srcdir}"/setuptools-${pkgver}-python2 + cd "$srcdir"/setuptools-$pkgver-py2 + python2 bootstrap.py 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 -#} - + +check() { ( + # Workaround UTF-8 tests by setting LC_CTYPE + export LC_CTYPE=en_US.UTF-8 + + # https://github.com/pypa/setuptools/pull/810 + export PYTHONDONTWRITEBYTECODE=1 + +# cd "$srcdir"/setuptools-$pkgver +# python setup.py pytest + + cd "$srcdir"/setuptools-$pkgver-py2 + python2 setup.py pytest +)} + +package_python-setuptools() { + depends=('python-packaging' 'python-appdirs') + provides=('python-distribute') + replaces=('python-distribute') + + cd "$srcdir"/setuptools-$pkgver + python 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') + depends=('python2-packaging' 'python2-appdirs') + provides=('python2-distribute') + replaces=('python2-distribute') - cd "${srcdir}/setuptools-${pkgver}-python2" - python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - rm "${pkgdir}/usr/bin/easy_install" + cd "$srcdir"/setuptools-$pkgver-py2 + python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build + rm "$pkgdir"/usr/bin/easy_install } -- cgit v0.12