[arch-commits] Commit in fpylll/trunk (PKGBUILD)
Antonio Rojas
arojas at archlinux.org
Wed Nov 9 20:26:32 UTC 2016
Date: Wednesday, November 9, 2016 @ 20:26:31
Author: arojas
Revision: 195246
Convert to python2/3 split package
Modified:
fpylll/trunk/PKGBUILD
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++----------
1 file changed, 31 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-11-09 20:08:26 UTC (rev 195245)
+++ PKGBUILD 2016-11-09 20:26:31 UTC (rev 195246)
@@ -1,26 +1,47 @@
# $Id$
# Maintainer: Antonio Rojas <arojas at archlinux.org>
-pkgname=fpylll
+pkgbase=fpylll
+pkgname=(python-fpylll python2-fpylll)
pkgver=0.2.3dev
-pkgrel=2
+pkgrel=1
pkgdesc="A Python interface for fplll"
arch=(i686 x86_64)
url="https://github.com/fplll/fpylll"
license=(GPL2)
-depends=(fplll python2-numpy cysignals)
-makedepends=(cython2)
-optdepends=('sagemath: use Sage integers implementation')
-source=("https://github.com/fplll/fpylll/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
+makedepends=(fplll python-numpy python-cysignals cython python2-numpy python2-cysignals cython2)
+source=("https://github.com/fplll/fpylll/releases/download/$pkgver/$pkgbase-$pkgver.tar.gz")
md5sums=('bebeead2e4a6f2fdb82410f04f0d1f4f')
+prepare() {
+ cp -r $pkgbase-$pkgver{,-py2}
+
+# workaround encoding error
+ sed -e '/long_description/d' -i $pkgbase-$pkgver/setup.py
+}
+
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-fpylll() {
+ depends=(fplll python-numpy python-cysignals)
+
+ cd $pkgbase-$pkgver
+ python setup.py install --skip-build --root="$pkgdir" --optimize=1
+}
+
+package_python2-fpylll() {
+ depends=(fplll python2-numpy python2-cysignals)
+ optdepends=('sagemath: use Sage integers implementation')
+ conflicts=(fpylll)
+ provides=(fpylll)
+ replaces=(fpylll)
+
+ cd $pkgbase-$pkgver-py2
python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
}
-
More information about the arch-commits
mailing list