summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2019-11-13 00:52:04 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2020-04-03 18:42:14 +0000
commitf98c206bdf01529f8ea395a719b10baf2bdf717f (patch)
tree4fa1f123ab616f918c1e0c6effc870586ab8a72d
parente1f7c22d701138ec1a23f6e71d808acb4cd3aafb (diff)
Fix configure python lib detection in macOS
pylib_loc = python.get_variable('LIBPL', '') alreay returns the correct path for python's library dir
-rw-r--r--meson.build17
1 files changed, 5 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index d7c7e66..70a01fb 100644
--- a/meson.build
+++ b/meson.build
@@ -41,19 +41,12 @@ pylib_loc = get_option('libpython-dir')
if pylib_loc == ''
check_path_exists = 'import os, sys; assert(os.path.exists(sys.argv[1]))'
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', '')
- if host_machine.system() == 'darwin'
- # OSX is a pain. Python as shipped by apple installs libpython in /usr/lib
- # so we hardcode that. Other systems can use -Dlibpythondir to
- # override this.
- 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
+ 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
assert(