summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-02-05 22:55:04 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-02-05 22:55:04 +0100
commit3d4bc64461c7c59f5e4aaabe7f2752d6ece83ed0 (patch)
tree1d2e49a31575d00dfd6cfb36981433839304f1ea /setup.py
parenta153be8a6d79f52f1a45e2241e1fca5bd0aba6ea (diff)
downloadpygobject-3d4bc64461c7c59f5e4aaabe7f2752d6ece83ed0.tar.gz
setup.py: convince distutils to build dylibs on macOS
This makes the "build_tests" command work
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 44d65149..918a5654 100755
--- a/setup.py
+++ b/setup.py
@@ -265,6 +265,13 @@ class build_tests(Command):
# XXX: something broken with mingw python2
compiler.shared_lib_extension = ".dll"
+ if sys.platform == "darwin":
+ compiler.shared_lib_extension = ".dylib"
+ if "-bundle" in compiler.linker_so:
+ compiler.linker_so = list(compiler.linker_so)
+ i = compiler.linker_so.index("-bundle")
+ compiler.linker_so[i] = "-dynamiclib"
+
def build_ext(ext):
if compiler.compiler_type == "msvc":
raise Exception("MSVC support not implemented")