[arch-commits] Commit in cython/trunk (PKGBUILD)

Antonio Rojas arojas at archlinux.org
Fri Nov 3 19:47:45 UTC 2017


    Date: Friday, November 3, 2017 @ 19:47:44
  Author: arojas
Revision: 265372

Update to 0.27.3, revamp PKGBUILD

Modified:
  cython/trunk/PKGBUILD

----------+
 PKGBUILD |   42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-03 19:44:09 UTC (rev 265371)
+++ PKGBUILD	2017-11-03 19:47:44 UTC (rev 265372)
@@ -1,27 +1,39 @@
 # $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
 # Contributor: Igor Scabini <furester @ gmail.com>
 
-pkgname=('cython' 'cython2')
+pkgname=(cython cython2)
 pkgbase=cython
-pkgver=0.27.2
+pkgver=0.27.3
 pkgrel=1
 pkgdesc="C-Extensions for Python"
 arch=(i686 x86_64)
 url="http://cython.org"
-license=('APACHE')
-makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.python.org/packages/98/bb/cd2be435e28ee1206151793a528028e3dc9a787fe525049efb73637f52bb/Cython-$pkgver.tar.gz")
-sha256sums=('265dacf64ed8c0819f4be9355c39beaa13dc2ad2f85237a2c4e478f5ce644b48')
+license=(APACHE)
+makedepends=(python-setuptools python2-setuptools)
+source=($pkgbase-$pkgver.tar.gz::"https://github.com/cython/cython/archive/$pkgver.tar.gz")
+sha256sums=('cedc1173c36cc07eaa866e7edc0a728bc891ed20a9a7e27b7d35e5541d6e3ac4')
 
+prepare() {
+  cp -r cython-$pkgver cython2-$pkgver
+  find cython2-$pkgver -name '*.py' | xargs sed -e 's|/usr/bin/env python|/usr/bin/env python2|' -e 's|/usr/bin/python|/usr/bin/python2|' -i
+}
+
+build() {
+  cd cython-$pkgver
+  python setup.py build
+
+  cd ../cython2-$pkgver
+  python2 setup.py build
+}
+
 package_cython() {
-  depends=('python' 'python-setuptools')
+  depends=(python)
 
-  cd "$srcdir"/Cython-$pkgver
-  python setup.py install --root="$pkgdir"
+  cd cython-$pkgver
+  python setup.py install --root="$pkgdir" --skip-build
 
-  sed -i 's|#!.*python|#!/usr/bin/python3|' "$pkgdir"/usr/bin/*
-
   for f in cygdb cython cythonize; do
     mv "$pkgdir"/usr/bin/$f "$pkgdir"/usr/bin/${f}3
     ln -s ${f}3 "$pkgdir"/usr/bin/$f
@@ -29,10 +41,10 @@
 }
 
 package_cython2() {
-  depends=('python2' 'python2-setuptools')
+  depends=(python2)
 
-  cd "$srcdir"/Cython-$pkgver
-  python2 setup.py install --root="$pkgdir"
+  cd cython2-$pkgver
+  python2 setup.py install --root="$pkgdir" --skip-build
 
   for f in cygdb cython cythonize; do
     mv "$pkgdir"/usr/bin/$f "$pkgdir"/usr/bin/${f}2


More information about the arch-commits mailing list