blob: 895ebea32275bdc0df8767831d0df8a4ee94df77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Maintainer: Juacrumar <juacrumar at lairen dot eu>
pkgname=pineappl
pkgver=0.6.0
pkgrel=1
pkgdesc='PineAPPL is not an extension of APPLgrid. Installs pineappl_cli, pineappl library and python package'
arch=('any')
url="https://n3pdf.github.io/pineappl/"
license=('GPL3')
makedepends=("python-setuptools" "maturin" "python-pip")
depends=("cargo-c"
"rust"
"lhapdf"
"python-pkgconfig"
"python-numpy"
)
optdepends=()
provides=("pineappl")
changelog=
source=("https://github.com/N3PDF/pineappl/archive/v${pkgver}.tar.gz")
md5sums=("c9ab86eea2381080032d6d73922003f3")
build() {
# Build the python interface
cd "$pkgname-$pkgver"/pineappl_py
maturin build --release
}
package() {
echo "DONE"
# Install the command-line program
cd "$pkgname-$pkgver"
cargo install --path pineappl_cli --root=${pkgdir}/usr --no-track --features=fktable,evolve
# Install pineappl_capi
cd pineappl_capi
cargo cinstall --release --destdir=${pkgdir} --prefix=/usr
cd ..
# And the python wrapper
cd 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, might stored
}
|