aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-02-21 17:12:09 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-02-21 17:12:09 +0200
commita04c33e12527d3ed7a07dce0380afabb46cf4f3d (patch)
tree8378a46f1af284779f1d7f347d52147de3c55a57 /mesonbuild/dependencies.py
parent98d3fb53725cf961b554a4f44e64975be896eeeb (diff)
downloadmeson-a04c33e12527d3ed7a07dce0380afabb46cf4f3d.zip
meson-a04c33e12527d3ed7a07dce0380afabb46cf4f3d.tar.gz
meson-a04c33e12527d3ed7a07dce0380afabb46cf4f3d.tar.bz2
Can build Python extension on OSX.
Diffstat (limited to 'mesonbuild/dependencies.py')
-rw-r--r--mesonbuild/dependencies.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
index 6171c41..ca5fa89 100644
--- a/mesonbuild/dependencies.py
+++ b/mesonbuild/dependencies.py
@@ -1077,6 +1077,7 @@ class ThreadDependency(Dependency):
class Python3Dependency(Dependency):
def __init__(self, environment, kwargs):
super().__init__()
+ self.name = 'python3'
self.is_found = False
try:
pkgdep = PkgConfigDependency('python3', environment, kwargs)
@@ -1100,6 +1101,14 @@ class Python3Dependency(Dependency):
self.libs = ['-L{}/libs'.format(basedir),
'-lpython{}'.format(vernum)]
self.is_found = True
+ elif mesonlib.is_osx():
+ # In OSX the Python 3 framework does not have a version
+ # number in its name.
+ fw = ExtraFrameworkDependency('python', False)
+ if fw.found():
+ self.cargs = fw.get_compile_args()
+ self.libs = fw.get_link_args()
+ self.is_found = True
if self.is_found:
mlog.log('Dependency', mlog.bold(self.name), 'found:', mlog.green('YES'))
else: