Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-12693: Add upstream fix for linking problem with modern miniconda #16

Merged
merged 1 commit into from
Dec 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions patches/0003-fix-anaconda-linking.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/SConstruct.orig b/SConstruct
index 2538aba..357b954 100644
--- a/SConstruct.orig
+++ b/SConstruct
@@ -1210,5 +1210,15 @@
config.Message('Checking if we can build against Python... ')

+ # Check if we need to add any additional linking flags according to what is given in
+ # sysconfig.get_config_var("LDSHARED"). cf. Issue #924
+ sys_builder = distutils.sysconfig.get_config_var("LDSHARED")
+ ldflags = sys_builder.split()
+ ldflags = ldflags[1:] # strip off initial gcc or cc
+ config.env.Replace(LDMODULEFLAGS=['$LINKFLAGS'] + ldflags)
+ # Need this too to get consistency, e.g. with --arch options.
+ ccflags = distutils.sysconfig.get_config_var("CCSHARED")
+ config.env.Append(CCFLAGS=ccflags.split())
+
# First check the python include directory -- see if we can compile the module.
source_file2 = "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())"
result, py_inc = TryScript(config,source_file2,python)