summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastiaan Lokhorst2019-04-03 21:06:02 +0200
committerSebastiaan Lokhorst2019-04-03 21:06:02 +0200
commitfb1d8f12246ba3a41e98e8c7e3218b620a2cd215 (patch)
treeb4b23cca88e2d00759e0c8fdadd7db4e4d1c08f9
parent629cd29bbcf6becb0838a750624af822977e54cd (diff)
downloadaur-fb1d8f12246ba3a41e98e8c7e3218b620a2cd215.tar.gz
Autodect Python version so we don't break when it's updated
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 7 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2032e990852..8aa8bede8a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout
- pkgver = 0.19pre.r84.gb66a6fa31
+ pkgver = 0.19pre.r168.gd4f01c440
pkgrel = 1
epoch = 1
url = https://www.freecadweb.org/
diff --git a/PKGBUILD b/PKGBUILD
index f9c8eace7a3..7c7fe13547c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_appname=freecad
pkgname="${_appname}-git"
-pkgver=0.19pre.r84.gb66a6fa31
+pkgver=0.19pre.r168.gd4f01c440
pkgrel=1
epoch=1
pkgdesc='A general purpose 3D CAD modeler - git checkout'
@@ -34,6 +34,8 @@ pkgver() {
build() {
cd "${srcdir}/${pkgname}"
+ PYVER="$(/usr/bin/python3 -c 'import sys; print("{}.{}".format(sys.version_info.major,sys.version_info.minor))')"
+
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr/lib/freecad" \
@@ -42,16 +44,13 @@ build() {
-DFREECAD_USE_OCC_VARIANT="Official Version" \
-DBUILD_QT5=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
- -DPYTHON_LIBRARY=/usr/lib/libpython3.7m.so \
- -DPYTHON_INCLUDE_DIR=/usr/include/python3.7m \
- -DPYTHON_PACKAGES_PATH=/usr/lib/python3.7/site-packages \
-DOPENMPI_INCLUDE_DIRS=/usr/include \
-DSHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2 \
-DSHIBOKEN_BINARY=/usr/bin/shiboken2 \
- -DSHIBOKEN_LIBRARY=/usr/lib/libshiboken2.cpython-37m-x86_64-linux-gnu.so \
+ -DSHIBOKEN_LIBRARY="/usr/lib/libshiboken2.cpython-${PYVER//.}m-x86_64-linux-gnu.so" \
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide2 \
- -DPYSIDE_LIBRARY=/usr/lib/libpyside2.cpython-37m-x86_64-linux-gnu.so \
- -DPYSIDE_PYTHONPATH=/usr/lib/python3.7/site-packages/PySide2 \
+ -DPYSIDE_LIBRARY="/usr/lib/libpyside2.cpython-${PYVER//.}m-x86_64-linux-gnu.so" \
+ -DPYSIDE_PYTHONPATH="/usr/lib/python${PYVER}/site-packages/PySide2" \
-DPYSIDE_TYPESYSTEMS=/usr/share/PySide2/typesystems
make