Browse Source

build script: dynamically find installed python version and add it to the PATH

Felix Paul Kühne 6 years ago
parent
commit
97b0b342a7
1 changed files with 7 additions and 1 deletions
  1. 7 1
      compileAndBuildVLCKit.sh

+ 7 - 1
compileAndBuildVLCKit.sh

@@ -1053,7 +1053,13 @@ if [ "$VLCROOT" = "" ]; then
     spopd
 fi
 
-export PATH="${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:${VLC_PATH}:/usr/bin:/bin:/usr/sbin:/sbin"
+# get python installation
+python3Path=$(echo /Library/Frameworks/Python.framework/Versions/3.*/bin | awk '{print $1;}')
+if [ ! -d "$python3Path" ]; then
+    python3Path=""
+fi
+
+export PATH="$python3Path:${VLCROOT}/extras/tools/build/bin:${VLCROOT}/contrib/${TARGET}/bin:${VLC_PATH}:/usr/bin:/bin:/usr/sbin:/sbin"
 
 echo `pwd`