--- Src/MPI/compile.py.orig	2009-10-13 18:42:27.000000000 +0400
+++ Src/MPI/compile.py	2009-10-13 18:42:40.000000000 +0400
@@ -5,7 +5,6 @@
 import distutils
 import distutils.sysconfig
 import os, sys
-from Scientific import N
 
 cfgDict = distutils.sysconfig.get_config_vars()
 
@@ -14,11 +13,10 @@
 sources='mpipython.c Scientific_mpi.c'
 
 extra_compile_args = ""
-if N.package == "NumPy":
-    arrayobject_h_include = os.path.join(sys.prefix,
-                            "lib/python%s.%s/site-packages/numpy/core/include"
-                                          % sys.version_info [:2])
-    extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
+arrayobject_h_include = os.path.join(sys.prefix,
+                        "lib/python%s.%s/site-packages/numpy/core/include"
+                                      % sys.version_info [:2])
+extra_compile_args = "-DNUMPY=1 -I"+arrayobject_h_include
 
 linkforshared = cfgDict['LINKFORSHARED']
 if sys.platform == 'darwin':
@@ -32,14 +30,12 @@
             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' % \
+cmd = '%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' % \
     (mpicompiler, 
      linkforshared,
      cfgDict['INCLUDEPY'],
      extra_compile_args,
      sources,
-     cfgDict['LIBPL'],
-     cfgDict['VERSION'], 
      cfgDict['LIBS'], 
      cfgDict['LIBM'])
 
