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

Diff of /trunk/site_scons/site_init.py

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

revision 3974 by jfenwick, Thu Jun 14 01:01:03 2012 UTC revision 3975 by caltinay, Thu Sep 20 01:54:06 2012 UTC
# Line 19  __license__="""Licensed under the Open S Line 19  __license__="""Licensed under the Open S
19  http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
20  __url__="https://launchpad.net/escript-finley"  __url__="https://launchpad.net/escript-finley"
21    
22  import sys, os, time, glob, fnmatch, types, py_compile, re  import sys, os, time, py_compile, re, subprocess
23    
24  def findLibWithHeader(env, libs, header, paths, lang='c'):  def findLibWithHeader(env, libs, header, paths, lang='c'):
25      from SCons.Script.SConscript import Configure      from SCons.Script.SConscript import Configure
# Line 69  def findLibWithHeader(env, libs, header, Line 69  def findLibWithHeader(env, libs, header,
69      conf.Finish()      conf.Finish()
70      return inc_path, lib_path      return inc_path, lib_path
71    
72    def detectModule(env, module):
73        if env['pythoncmd']=='python':
74            try:
75                __import__(module)
76            except ImportError:
77                return False
78        else:
79            p=subprocess.call([env['pythoncmd'],'-c','import %s'%module])
80            if p!=0:
81                return False
82        return True
83    
84  # Code to build .pyc from .py  # Code to build .pyc from .py
85  def build_py(target, source, env):  def build_py(target, source, env):

Legend:
Removed from v.3974  
changed lines
  Added in v.3975

  ViewVC Help
Powered by ViewVC 1.1.26