-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure custom flags get passed to python modules for macOS
Signed-off-by: falkTX <falktx@falktx.com>
- Loading branch information
Showing
2 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py | ||
index f159586..004e89f 100644 | ||
--- a/Lib/distutils/unixccompiler.py | ||
+++ b/Lib/distutils/unixccompiler.py | ||
@@ -200,6 +200,10 @@ class UnixCCompiler(CCompiler): | ||
|
||
if sys.platform == 'darwin': | ||
linker = _osx_support.compiler_fixup(linker, ld_args) | ||
+ if target_lang == "c++" and self.compiler_cxx: | ||
+ ld_args += linker[i+offset+1:] | ||
+ else: | ||
+ ld_args += linker[1:] | ||
|
||
self.spawn(linker + ld_args) | ||
except DistutilsExecError as msg: | ||
diff --git a/setup.py b/setup.py | ||
index 3a7a2e7..88e116a 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -2289,7 +2289,7 @@ class PyBuildExt(build_ext): | ||
# poor man's shlex, the re module is not available yet. | ||
value = config_vars.get(name) | ||
if not value: | ||
- return () | ||
+ return [] | ||
# This trick works because ax_check_openssl uses --libs-only-L, | ||
# --libs-only-l, and --cflags-only-I. | ||
value = ' ' + value |