summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFrank Siegert2018-08-16 14:58:54 +0200
committerFrank Siegert2018-08-16 14:59:00 +0200
commit0024f2f6eddd2f1fd2646f0fa93fa7c32b54e9c0 (patch)
tree4f63daa540002787cdbe3451e964faece4976ec7 /PKGBUILD
parente2a42bb4dfb0792aa967a9e066936a4e8031930d (diff)
downloadaur-0024f2f6eddd2f1fd2646f0fa93fa7c32b54e9c0.tar.gz
Update to use Python3.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 18 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6ff3c3d8b567..adbeef253808 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,28 @@
# Maintainer: Frank Siegert <frank.siegert@googlemail.com>
pkgname=rivet-hg
-pkgver=r4803.18d522e5cb21
+pkgver=r6396.6af72c1a196d
pkgrel=1
pkgdesc="A particle physics package for data analysis and validation of Monte Carlo event generators -- latest build from hg-repo"
arch=('x86_64' 'i686')
url="http://rivet.hepforge.org"
-license=('GPL2')
+license=('GPL3')
conflicts=('rivet')
provides=('rivet')
-depends=('python2' 'yoda-hg' 'fastjet' 'gsl' 'hepmc')
-makedepends=('cython2' 'boost' 'mercurial' 'autoconf' 'libtool' 'automake')
+depends=('python' 'yoda>=1.7.1' 'fastjet' 'gsl' 'hepmc')
+optdepends=('texlive-core: Plotting functionality'
+ 'ghostscript: PDF plot output'
+ 'imagemagick: PNG plot output'
+ 'python2: For Python2 module in addition to Python3')
+makedepends=('cython')
source=('hg+https://rivet.hepforge.org/hg/rivet')
md5sums=('SKIP')
-prepare() {
- cd "$srcdir/rivet"
- sed -e 's/\/usr\/bin\/env python$/\/usr\/bin\/env python2/g' -i bin/* doc/* pyext/setup.py.in pyext/rivet/spiresbib.py
- sed -e 's/cython /cython2 /g' -i pyext/rivet/Makefile.am
-}
-
build() {
cd "$srcdir/rivet"
- export PYTHON=/usr/bin/python2
autoreconf -i
+ ## need to rebuild Python extension code with up-to-date Cython for Python 3.7
+ ## will eventually be fixed upstream
+ touch pyext/rivet/*.pyx
./configure --prefix=/usr
make
}
@@ -30,6 +30,13 @@ build() {
package() {
cd "$srcdir/rivet"
make DESTDIR="$pkgdir/" install
+
+ # If python2 is present, also build a library for it
+ if [ -x /usr/bin/python2 ]; then
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr
+ make DESTDIR="$pkgdir/" install
+ fi
+
mkdir -p $pkgdir/etc/bash_completion.d
mv $pkgdir/usr/share/Rivet/rivet-completion $pkgdir/etc/bash_completion.d
}