summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorjuacrumar2022-02-12 14:33:52 +0100
committerjuacrumar2022-02-12 14:33:52 +0100
commitc5ba6cc5287b71c2186119dbaee8ee3c2bbb4582 (patch)
tree5308dc550ecd7f2c747175b9858a6255c7c90a0d /PKGBUILD
parent7355ff4661b571ccaf9b5db3e9e52ef4de8a69fb (diff)
downloadaur-c5ba6cc5287b71c2186119dbaee8ee3c2bbb4582.tar.gz
updated pineappl to 0.5.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 15 insertions, 17 deletions
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
}