summaryrefslogtreecommitdiff
path: root/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/scientificpython/files/scientificpython-2.9-mpi.patch')
-rw-r--r--dev-python/scientificpython/files/scientificpython-2.9-mpi.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch b/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
new file mode 100644
index 00000000000..3140779c74a
--- /dev/null
+++ b/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
@@ -0,0 +1,40 @@
+--- Src/MPI/compile.py
++++ Src/MPI/compile.py
+@@ -4,7 +4,7 @@
+ # Normally nothing needs to be changed below
+ import distutils
+ import distutils.sysconfig
+-import os, sys
++import os, subprocess, sys
+ from Scientific import N
+
+ cfgDict = distutils.sysconfig.get_config_vars()
+@@ -32,16 +32,16 @@
+ items[i] = os.path.join(frameworkdir[0], items[i])
+ linkforshared = ' '.join(items)
+
+-cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
+- (mpicompiler,
+- linkforshared,
+- cfgDict['INCLUDEPY'],
+- extra_compile_args,
+- sources,
+- cfgDict['LIBPL'],
+- cfgDict['VERSION'],
+- cfgDict['LIBS'],
+- cfgDict['LIBM'])
++cmd = [mpicompiler]
++cmd.extend(linkforshared.split())
++cmd.extend(os.environ.get("CFLAGS", "").split())
++cmd.extend(os.environ.get("LDFLAGS", "").split())
++cmd.extend(["-o", "mpipython"])
++cmd.extend(["-I" + x for x in cfgDict['INCLUDEPY'].split()])
++cmd.extend(["-I../../Include"])
++cmd.extend(extra_compile_args.split())
++cmd.extend(sources.split())
++cmd.extend(["-lpython%s" % cfgDict['VERSION']])
+
+-print 'cmd = ', cmd
+-os.system(cmd)
++print 'cmd =', " ".join(cmd)
++sys.exit(subprocess.call(cmd))