/[escript]/trunk/site_scons/dependencies.py
ViewVC logotype

Diff of /trunk/site_scons/dependencies.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6489 by jfenwick, Thu Feb 9 00:28:44 2017 UTC revision 6490 by jfenwick, Thu Feb 9 01:21:02 2017 UTC
# Line 87  def call_python_config(bin=None): Line 87  def call_python_config(bin=None):
87      cmd+="libdirs=[z[2:] for z in d if z.startswith(b'-L')]\n"      cmd+="libdirs=[z[2:] for z in d if z.startswith(b'-L')]\n"
88      cmd+="libs=[z[2:] for z in d if z.startswith(b'-lpython')]\n"      cmd+="libs=[z[2:] for z in d if z.startswith(b'-lpython')]\n"
89      cmd+="target=''\n"      cmd+="target=''\n"
90        cmd+="libname=''\n"
91      cmd+="for d in libdirs:\n"      cmd+="for d in libdirs:\n"
92      cmd+="  for f in libs:\n"      cmd+="  for f in libs:\n"
93      cmd+="    s=os.path.join(d,b'lib'+f+b'.so')\n"      cmd+="    s=os.path.join(d,b'lib'+f+b'.so')\n"
# Line 97  def call_python_config(bin=None): Line 98  def call_python_config(bin=None):
98      cmd+="        libname=f\n"      cmd+="        libname=f\n"
99      cmd+="    except Exception:\n"      cmd+="    except Exception:\n"
100      cmd+="      pass\n"      cmd+="      pass\n"
101        cmd+="    s=os.path.join(d,b'lib'+f+b'.dylib')\n"
102        cmd+="    try:\n"
103        cmd+="      dummy=os.stat(s)\n"
104        cmd+="      if target=='':\n"
105        cmd+="        target=d\n"
106        cmd+="        libname=f\n"
107        cmd+="    except Exception:\n"
108        cmd+="      pass\n"
109      if bin is None:      if bin is None:
110         exec(cmd)         exec(cmd)
111         ver=str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2])         ver=str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2])
# Line 116  def call_python_config(bin=None): Line 125  def call_python_config(bin=None):
125      libname=sp.stdout.readline().strip()      libname=sp.stdout.readline().strip()
126      ver=sp.stdout.readline().strip()      ver=sp.stdout.readline().strip()
127      pinc=sp.stdout.readline().strip()      pinc=sp.stdout.readline().strip()
128        print((target, libname, ver, pinc))
129      return (target, libname, ver, pinc)      return (target, libname, ver, pinc)
130    
131  def checkPython(env):  def checkPython(env):

Legend:
Removed from v.6489  
changed lines
  Added in v.6490

  ViewVC Help
Powered by ViewVC 1.1.26