[vlc-commits] macOS build.sh: Automatically search for python3 package

David Fuhrmann git at videolan.org
Wed Apr 29 18:15:12 CEST 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Apr 29 18:13:22 2020 +0200| [e23157c88a355b0677880e258d15345c87bc0ac9] | committer: David Fuhrmann

macOS build.sh: Automatically search for python3 package

Search for standard location of python3 package from python.org
and add it to the PATH if found.

This is a manual backport of the code from vlc.git

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e23157c88a355b0677880e258d15345c87bc0ac9
---

 extras/package/macosx/build.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index c7b209a010..d2f7b53f7a 100755
--- a/extras/package/macosx/build.sh
+++ b/extras/package/macosx/build.sh
@@ -127,12 +127,18 @@ info "Building in \"$builddir\""
 
 TRIPLET=$ARCH-apple-darwin$OSX_KERNELVERSION
 
+python3Path=$(echo /Library/Frameworks/Python.framework/Versions/3.*/bin | awk '{print $1;}')
+if [ ! -d "$python3Path" ]; then
+	python3Path=""
+fi
+
 export CC="`xcrun --find clang`"
 export CXX="`xcrun --find clang++`"
 export OBJC="`xcrun --find clang`"
 export OSX_VERSION
 export SDKROOT
-export PATH="${vlcroot}/extras/tools/build/bin:${vlcroot}/contrib/${TRIPLET}/bin:${VLC_PATH}:/bin:/sbin:/usr/bin:/usr/sbin"
+export PATH="${vlcroot}/extras/tools/build/bin:${vlcroot}/contrib/${TRIPLET}/bin:$python3Path:${VLC_PATH}:/bin:/sbin:/usr/bin:/usr/sbin"
+
 
 # Select avcodec flavor to compile contribs with
 export USE_FFMPEG=1



More information about the vlc-commits mailing list