Ticket #22033: patch-Src-MPI-compile.py.diff

File patch-Src-MPI-compile.py.diff, 1.5 KB (added by stromnov (Andrey Stromnov), 15 years ago)
  • Src/MPI/compile.py

    old new  
    55import distutils
    66import distutils.sysconfig
    77import os, sys
    8 from Scientific import N
    98
    109cfgDict = distutils.sysconfig.get_config_vars()
    1110
     
    1413sources='mpipython.c Scientific_mpi.c'
    1514
    1615extra_compile_args = ""
    17 if N.package == "NumPy":
    18     arrayobject_h_include = os.path.join(sys.prefix,
    19                             "lib/python%s.%s/site-packages/numpy/core/include"
    20                                           % sys.version_info [:2])
    21     extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
     16arrayobject_h_include = os.path.join(sys.prefix,
     17                        "lib/python%s.%s/site-packages/numpy/core/include"
     18                                      % sys.version_info [:2])
     19extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
    2220
    2321linkforshared = cfgDict['LINKFORSHARED']
    2422if sys.platform == 'darwin':
     
    3230            items[i] = os.path.join(frameworkdir[0], items[i])
    3331    linkforshared = ' '.join(items)
    3432
    35 cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
     33cmd = '%s %s -o mpipython -Wl,-search_paths_first @prefix@/lib/libmpi.a @prefix@/lib/liblam.a -I@worksrcpath@/Include -I%s %s %s %s %s' % \
    3634    (mpicompiler,
    3735     linkforshared,
    3836     cfgDict['INCLUDEPY'],
    3937     extra_compile_args,
    4038     sources,
    41      cfgDict['LIBPL'],
    42      cfgDict['VERSION'],
    4339     cfgDict['LIBS'],
    4440     cfgDict['LIBM'])
    4541