/[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 4418 by caltinay, Fri Mar 22 00:05:25 2013 UTC revision 4419 by caltinay, Mon May 20 05:03:35 2013 UTC
# Line 87  def checkPython(env): Line 87  def checkPython(env):
87          initstring='from __future__ import print_function;from distutils import sysconfig;'          initstring='from __future__ import print_function;from distutils import sysconfig;'
88          if env['pythonlibname']!='':          if env['pythonlibname']!='':
89              python_libs=env['pythonlibname']              python_libs=env['pythonlibname']
90          else:   # work it out by calling python              else:   # work it out by calling python
91              if ['IS_WINDOWS']:              if ['IS_WINDOWS']:
92                  cmd='print("python%s%s"%(sys.version_info[0], sys.version_info[1]))'                  cmd='print("python%s%s"%(sys.version_info[0], sys.version_info[1]))'
93              else:              else:
# Line 99  def checkPython(env): Line 99  def checkPython(env):
99              p.wait()              p.wait()
100              python_libs=python_libs.strip()              python_libs=python_libs.strip()
101    
         
102          # Now we know whether we are using python3 or not          # Now we know whether we are using python3 or not
103          p=Popen([env['pythoncmd'], '-c',  initstring+'print(sysconfig.get_python_inc())'], stdout=PIPE)          p=Popen([env['pythoncmd'], '-c',  initstring+'print(sysconfig.get_python_inc())'], stdout=PIPE)
104          python_inc_path=p.stdout.readline()          python_inc_path=p.stdout.readline()
105          if env['usepython3']:          if env['usepython3']:
106               python_inc_path=python_inc_path.encode()               python_inc_path=python_inc_path.encode()
107          p.wait()            p.wait()
108          python_inc_path=python_inc_path.strip()          python_inc_path=python_inc_path.strip()
109          if ['IS_WINDOWS']:          if env['IS_WINDOWS']:
110              cmd="os.path.join(sysconfig.get_config_var('prefix'), 'libs')"              cmd="import os;os.path.join(sysconfig.get_config_var('prefix'), 'libs')"
111          elif env['PLATFORM']=='darwin':          elif env['PLATFORM']=='darwin':
112              cmd="sysconfig.get_config_var(\"LIBPL\")"              cmd="sysconfig.get_config_var(\"LIBPL\")"
113          else:          else:

Legend:
Removed from v.4418  
changed lines
  Added in v.4419

  ViewVC Help
Powered by ViewVC 1.1.26