summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandy2019-12-06 15:33:19 +0100
committerGitHub2019-12-06 15:33:19 +0100
commitcddb8df25494ed181a5500930f44b3a8dbcfb115 (patch)
treef042bfaba18f334431f866b2f1aee880463bbb3e
parentb2e327c3d4890b83556013315751c703086e68af (diff)
downloadaur-cddb8df25494ed181a5500930f44b3a8dbcfb115.tar.gz
get `_pyver` in package step
`_pyver` does not always persist when building package For example running `makepkg --repackage` which skips the `build()` function. This also fixes installing mitsuba with an aur helper such as `yay`
-rw-r--r--PKGBUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 36add75f7a11..7455475906a2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,7 +30,7 @@ pkgver() {
prepare() {
cd "${_pkgname}"
- export _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
+ export _pyver=$(python -c "print('%d.%d' % __import__('sys').version_info[:2])")
cp build/config-linux-gcc.py config.py
## use collada-dom-mitsuba
@@ -66,6 +66,7 @@ build() {
package() {
cd "${_pkgname}"
+ export _pyver=$(python -c "print('%d.%d' % __import__('sys').version_info[:2])")
install -d \
${pkgdir}/usr/bin \
${pkgdir}/usr/lib \