/[escript]/trunk/bruce/py_src/SConscript
ViewVC logotype

Diff of /trunk/bruce/py_src/SConscript

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

revision 352 by jgs, Wed Dec 14 02:21:37 2005 UTC revision 700 by gross, Thu Apr 6 00:13:40 2006 UTC
# Line 1  Line 1 
 pyinstall = None  
   
 Import('*')  
   
1  import os  import os
2  import sys  Import('*')
   
 extensions_dir = str(esysroot) + '/scons'  
 sys.path.append(extensions_dir)  
   
 import scons_extensions  
   
 brucepy_env = Environment(ENV = os.environ)  
   
 py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)  
 brucepy_env.Append(BUILDERS = {'PyCompile' : py_builder});  
   
 python_src = ['__init__.py',  
               'bruce.py']  
3    
4  pyc = brucepy_env.PyCompile(python_src)  local_env=env.Copy()
5    
6  Default(brucepy_env.Install(pydir, pyc))  #
7  Default(brucepy_env.Install(pydir2, pyc))  # get the relevant file names:
8  if pyinstall != None:  #
9    Default(brucepy_env.Install(pyinstall, pyc))  src_dir = local_env.Dir('.').srcnode().abspath
10    filenames = os.listdir(src_dir)
11    
12    #
13    # get all the python files to be compiled (extension *.py)
14    #
15    python_src = [x for x in filenames if os.path.splitext(x)[1] in [".py"] ]
16    pyc = local_env.PyCompile(python_src)
17    
18    local_env.Depends(pyc, dep_lib)
19    local_env.Install(pyinstall+'/bruce', pyc)
20    
21    # get all the python files in the release tar file
22    release_py = [ env.File("SConscript"), ] + [ env.File(x) for x in python_src ]
23    env.Zip(src_zipfile, release_py)
24    env.Tar(src_tarfile, release_py)

Legend:
Removed from v.352  
changed lines
  Added in v.700

  ViewVC Help
Powered by ViewVC 1.1.26