mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
Fix configure python lib detection in macOS
pylib_loc = python.get_variable('LIBPL', '') alreay returns the correct path for python's library dir
This commit is contained in:
parent
e1f7c22d70
commit
f98c206bdf
1 changed files with 5 additions and 12 deletions
17
meson.build
17
meson.build
|
@ -41,19 +41,12 @@ pylib_loc = get_option('libpython-dir')
|
||||||
if pylib_loc == ''
|
if pylib_loc == ''
|
||||||
check_path_exists = 'import os, sys; assert(os.path.exists(sys.argv[1]))'
|
check_path_exists = 'import os, sys; assert(os.path.exists(sys.argv[1]))'
|
||||||
pylib_loc = python.get_variable('LIBPL', '')
|
pylib_loc = python.get_variable('LIBPL', '')
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
|
||||||
pylib_ldlibrary = python.get_variable('LDLIBRARY', '')
|
pylib_ldlibrary = python.get_variable('LDLIBRARY', '')
|
||||||
if host_machine.system() == 'darwin'
|
if run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)).returncode() != 0
|
||||||
# OSX is a pain. Python as shipped by apple installs libpython in /usr/lib
|
# Workaround for Fedora
|
||||||
# so we hardcode that. Other systems can use -Dlibpythondir to
|
pylib_loc = python.get_variable('LIBDIR', '')
|
||||||
# override this.
|
message('pylib_loc = @0@'.format(pylib_loc))
|
||||||
pylib_loc = '/usr/lib'
|
|
||||||
else
|
|
||||||
if run_command(python, '-c', check_path_exists, join_paths(pylib_loc, pylib_ldlibrary)).returncode() != 0
|
|
||||||
# Workaround for Fedora
|
|
||||||
pylib_loc = python.get_variable('LIBDIR', '')
|
|
||||||
message('pylib_loc = @0@'.format(pylib_loc))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
|
|
Loading…
Reference in a new issue