summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorkikislater2023-05-16 15:22:57 +0400
committerkikislater2023-05-16 15:22:57 +0400
commit04ba69eed5671d5fa5968641870a3f252006cb52 (patch)
treeca287c9b103b9dcfb2c1d39141a4ababb6d97156 /PKGBUILD
parent0710d38f75f2f5c9f013df07665d372a162e4c8d (diff)
downloadaur-04ba69eed5671d5fa5968641870a3f252006cb52.tar.gz
Auto find site-packages
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD8
1 files changed, 5 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4e23eb5d7247..fa55d1552e7a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=grass
pkgver=8.2.1
-pkgrel=2
+pkgrel=3
_shortver=${pkgver%.*}; _shortver=${_shortver/./}
pkgdesc='Geospatial data management and analysis, image processing, graphics/maps production, spatial modeling and visualization'
arch=('i686' 'x86_64')
@@ -62,7 +62,9 @@ package() {
etc/fontcap \
"$pkgdir/usr/bin/grass"
+ # Get python lib path
+ pylib=$(python -c "import sys; print(sys.path[len(sys.path)-1])")
# Link pygrass to main python site-packages
- mkdir -p "$pkgdir/usr/lib/python3.10/site-packages/"
- ln -s "$pkgdir/opt/grass/etc/python/grass" "$pkgdir/usr/lib/python3.10/site-packages/grass"
+ mkdir -p "$pkgdir$pylib"
+ ln -s "$pkgdir/opt/grass/etc/python/grass" "$pkgdir$pylib"
}