diff options
| -rw-r--r-- | mesonbuild/dependencies/python.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index c978ad62e..f45b4f908 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -327,6 +327,12 @@ class PythonPkgConfigDependency(PkgConfigDependency, _PythonDependencyBase): if not self.link_libpython and mesonlib.version_compare(self.version, '< 3.8'): self.link_args = [] + # But not Apple, because it's a framework + if self.env.machines.host.is_darwin() and 'PYTHONFRAMEWORKPREFIX' in self.variables: + framework_prefix = self.variables['PYTHONFRAMEWORKPREFIX'] + # Add rpath, will be de-duplicated if necessary + if framework_prefix.startswith('/Applications/Xcode.app/'): + self.link_args += ['-rpath,' + framework_prefix] class PythonFrameworkDependency(ExtraFrameworkDependency, _PythonDependencyBase): |
