[arch-commits] Commit in cysignals/trunk (PKGBUILD)
Antonio Rojas
arojas at archlinux.org
Wed Nov 9 20:07:17 UTC 2016
Date: Wednesday, November 9, 2016 @ 20:07:16
Author: arojas
Revision: 195242
Convert to python2/3 split package (FS#51770)
Modified:
cysignals/trunk/PKGBUILD
----------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++----------
1 file changed, 32 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-11-09 20:04:49 UTC (rev 195241)
+++ PKGBUILD 2016-11-09 20:07:16 UTC (rev 195242)
@@ -1,31 +1,53 @@
# $Id$
# Maintainer: Antonio Rojas <arojas at archlinux.org>
-pkgname=cysignals
+pkgbase=cysignals
+pkgname=(python-cysignals python2-cysignals)
pkgver=1.3.2
-pkgrel=3
+pkgrel=1
pkgdesc="Interrupt and signal handling for Cython"
arch=(i686 x86_64)
url="https://www.sagemath.org"
license=(LGPL)
-depends=(python2 pari-sage)
-makedepends=(python2-sphinx cython2)
-source=("https://github.com/sagemath/cysignals/releases/download/$pkgver/$pkgname-$pkgver.tar.bz2")
+makedepends=(python2-sphinx cython2 python-sphinx cython pari-sage)
+source=("https://github.com/sagemath/cysignals/releases/download/$pkgver/$pkgbase-$pkgver.tar.bz2")
md5sums=('abc98cb7b07c3a40979ee24dead06a38')
prepare() {
- sed -e 's|sphinx-build|sphinx-build2|g' -i $pkgname-$pkgver/docs/Makefile
+ cp -r $pkgbase-$pkgver{,-py2}
+ sed -e 's|sphinx-build|sphinx-build2|g' -i $pkgbase-$pkgver-py2/docs/Makefile
}
build() {
- cd $pkgname-$pkgver
+ cd $pkgbase-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/$pkgbase-$pkgver-py2
python2 setup.py build
}
-package() {
- cd $pkgname-$pkgver
+package_python-cysignals() {
+ depends=(python pari-sage)
+
+ cd $pkgbase-$pkgver
+ python setup.py install --root="$pkgdir"
+
+# Fix include dir
+ sed -e "s|/build/cysignals/pkg/$pkgname||" -i "$pkgdir"/usr/lib/*/site-packages/cysignals/__init__.pxd
+
+# Keep scripts in python2 package
+ rm -r "$pkgdir"/usr/bin
+}
+
+package_python2-cysignals() {
+ depends=(python2 pari-sage)
+ conflicts=(cysignals)
+ provides=(cysignals)
+ replaces=(cysignals)
+
+ cd $pkgbase-$pkgver-py2
python2 setup.py install --root="$pkgdir"
# Fix include dir
- sed -e 's|/build/cysignals/pkg/cysignals||' -i "$pkgdir"/usr/lib/python2.7/site-packages/cysignals/__init__.pxd
+ sed -e "s|/build/cysignals/pkg/$pkgname||" -i "$pkgdir"/usr/lib/*/site-packages/cysignals/__init__.pxd
}
More information about the arch-commits
mailing list