Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/scientificpython/files: scientificpython-2.9-mpi.patch
Date: Sat, 05 Sep 2009 01:33:14
Message-Id: E1Mjk9Q-0007d6-WA@stork.gentoo.org
1 arfrever 09/09/05 01:33:12
2
3 Added: scientificpython-2.9-mpi.patch
4 Log:
5 Set SUPPORT_PYTHON_ABIS. Fix building of mpipython.
6 (Portage version: 14184-svn/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch?rev=1.1&content-type=text/plain
13
14 Index: scientificpython-2.9-mpi.patch
15 ===================================================================
16 --- Src/MPI/compile.py
17 +++ Src/MPI/compile.py
18 @@ -4,7 +4,7 @@
19 # Normally nothing needs to be changed below
20 import distutils
21 import distutils.sysconfig
22 -import os, sys
23 +import os, subprocess, sys
24 from Scientific import N
25
26 cfgDict = distutils.sysconfig.get_config_vars()
27 @@ -32,16 +32,16 @@
28 items[i] = os.path.join(frameworkdir[0], items[i])
29 linkforshared = ' '.join(items)
30
31 -cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
32 - (mpicompiler,
33 - linkforshared,
34 - cfgDict['INCLUDEPY'],
35 - extra_compile_args,
36 - sources,
37 - cfgDict['LIBPL'],
38 - cfgDict['VERSION'],
39 - cfgDict['LIBS'],
40 - cfgDict['LIBM'])
41 +cmd = [mpicompiler]
42 +cmd.extend(linkforshared.split())
43 +cmd.extend(os.environ.get("CFLAGS", "").split())
44 +cmd.extend(os.environ.get("LDFLAGS", "").split())
45 +cmd.extend(["-o", "mpipython"])
46 +cmd.extend(["-I" + x for x in cfgDict['INCLUDEPY'].split()])
47 +cmd.extend(["-I../../Include"])
48 +cmd.extend(extra_compile_args.split())
49 +cmd.extend(sources.split())
50 +cmd.extend(["-lpython%s" % cfgDict['VERSION']])
51
52 -print 'cmd = ', cmd
53 -os.system(cmd)
54 +print 'cmd =', " ".join(cmd)
55 +sys.exit(subprocess.call(cmd))