summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD32
2 files changed, 20 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 415b047e602e..a787ecdc7b08 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
pkgbase = pineappl
pkgdesc = PineAPPL is not an extension of APPLgrid
- pkgver = 0.4.1
+ pkgver = 0.5.0
pkgrel = 1
url = https://n3pdf.github.io/pineappl/
arch = any
license = GPL3
makedepends = python-setuptools
+ makedepends = maturin
+ makedepends = python-pip
depends = cargo-c
depends = rust
depends = lhapdf
depends = python-pkgconfig
depends = python-numpy
provides = pineappl
- source = https://github.com/N3PDF/pineappl/archive/v0.4.1.tar.gz
- md5sums = 756e186f88caaf5ddf1883ae74f397ac
+ source = https://github.com/N3PDF/pineappl/archive/v0.5.0.tar.gz
+ md5sums = e1f231e7a5d84e1af219e02189292711
pkgname = pineappl
-
diff --git a/PKGBUILD b/PKGBUILD
index 9efb0f46f0cb..b4eb6f52cfc3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
# Maintainer: Juacrumar <juacrumar at lairen dot eu>
pkgname=pineappl
-pkgver=0.4.1
+pkgver=0.5.0
pkgrel=1
pkgdesc='PineAPPL is not an extension of APPLgrid'
arch=('any')
url="https://n3pdf.github.io/pineappl/"
license=('GPL3')
-makedepends=("python-setuptools")
+makedepends=("python-setuptools" "maturin" "python-pip")
depends=("cargo-c"
"rust"
"lhapdf"
@@ -18,29 +18,27 @@ optdepends=()
provides=("pineappl")
changelog=
source=("https://github.com/N3PDF/pineappl/archive/v${pkgver}.tar.gz")
-md5sums=("756e186f88caaf5ddf1883ae74f397ac")
-
-prepare() {
- cd "$pkgname-$pkgver"
- # Patch the loader
- sed -i "s/pkgconfig.libs('pineappl_capi').split(' ')/pkgconfig.libs('pineappl_capi').split(' ')\nif len(paths) < 2: paths.insert(0, '-L\/usr\/lib')/" wrappers/python/src/pineappl/loader.py
-}
+md5sums=("e1f231e7a5d84e1af219e02189292711")
build() {
# Build the python interface
- cd "$pkgname-$pkgver"/wrappers/python
- python setup.py build
- cd ../../..
+ cd "$pkgname-$pkgver"/pineappl_py
+ maturin build --release
}
package() {
+ # Install the command-line program
+ cd "$pkgname-$pkgver"
+ cargo install --path pineappl_cli --root=${pkgdir}/usr --no-track
# Install pineappl_capi
- cd "$pkgname-$pkgver"/pineappl_capi
+ cd pineappl_capi
cargo cinstall --release --destdir=${pkgdir} --prefix=/usr
cd ..
- # Now install the command-line program
- cargo install --path pineappl_cli --root=${pkgdir}/usr
# And the python wrapper
- cd wrappers/python
- python setup.py install --root="${pkgdir}" --optimize=2 --skip-build
+ cd pineappl_py/target/wheels/
+ PYTHONDONTWRITEBYTECODE=1 PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps *.whl
+ # manually remove __pycache__ from pkgdir (isn't there a better way?)
+ rm -rf ${pkgdir}/usr/lib/python*/site-packages/pineappl/__pycache__
+ # Note: some debug information, including the folder where the package was built, is stored
+ # I haven't found a way of stripping that information and so some warnings might be shown
}