[arch-commits] Commit in python-setuptools/repos (staging-any staging-any/PKGBUILD)

Felix Yan fyan at archlinux.org
Sat Sep 19 09:15:00 UTC 2015


    Date: Saturday, September 19, 2015 @ 11:15:00
  Author: fyan
Revision: 246575

archrelease: copy trunk to staging-any

Added:
  python-setuptools/repos/staging-any/
  python-setuptools/repos/staging-any/PKGBUILD
    (from rev 246574, python-setuptools/trunk/PKGBUILD)

----------+
 PKGBUILD |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

Copied: python-setuptools/repos/staging-any/PKGBUILD (from rev 246574, python-setuptools/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2015-09-19 09:15:00 UTC (rev 246575)
@@ -0,0 +1,71 @@
+# $Id$
+# Maintainer: Angel Velasquez <angvp at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-setuptools
+pkgname=('python-setuptools' 'python2-setuptools')
+pkgver=18.3.1
+pkgrel=2
+epoch=1
+pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
+arch=('any')
+license=('PSF')
+url="http://pypi.python.org/pypi/setuptools"
+makedepends=('python-packaging' 'python2-packaging')
+checkdepends=('python-mock' 'python2-mock' 'python-pytest-runner' 'python2-pytest-runner' 'git')
+source=("https://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz")
+sha512sums=('1a00386cd33267c1787b50a26cb008c975e720e0ef17d5d9c89c1d2f62a6b1d86e4731ab259667d9e2eb1d4c29bc96729221e672e1c3a6e18a181c8f35711f21')
+
+prepare() {
+  # We ship separated python{,2}-packaging packages.
+  rm -r setuptools-${pkgver}/pkg_resources/_vendor
+
+  cp -a setuptools-${pkgver}{,-python2}
+
+  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}-python2
+  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
+}
+
+check() {
+  # Workaround UTF-8 tests by setting LC_CTYPE
+
+  # Check python3 module
+  cd "${srcdir}"/setuptools-${pkgver}
+  LC_CTYPE=en_US.utf8 python3 setup.py ptr
+
+  # Check python2 module
+  cd "${srcdir}"/setuptools-${pkgver}-python2
+  LC_CTYPE=en_US.utf8 python2 setup.py ptr
+}
+ 
+package_python-setuptools() {
+  depends=('python-packaging')
+  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-packaging')
+  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"
+}



More information about the arch-commits mailing list