/[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 268 by jgs, Wed Nov 30 01:39:47 2005 UTC revision 707 by gross, Wed Apr 12 23:58:02 2006 UTC
# Line 1  Line 1 
1  pyinstall = None  #
2    #          Copyright 2006 by ACcESS MNRF
3  Import('*')  #
4    #              http://www.access.edu.au
5    #       Primary Business: Queensland, Australia
6    #  Licensed under the Open Software License version 3.0
7    #     http://www.opensource.org/licenses/osl-3.0.php
8    #
9    #
10    #
11  import os  import os
12  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']  
13    
14  pyc = brucepy_env.PyCompile(python_src)  local_env=env.Copy()
 brucepy_env.Install(pydir, pyc)  
15    
16  if pyinstall != None:  #
17    brucepy_env.Install(pyinstall, pyc)  # get the relevant file names:
18    #
19    src_dir = local_env.Dir('.').srcnode().abspath
20    filenames = os.listdir(src_dir)
21    
22    #
23    # get all the python files to be compiled (extension *.py)
24    #
25    python_src = [x for x in filenames if os.path.splitext(x)[1] in [".py"] ]
26    pyc = local_env.PyCompile(python_src)
27    
28    local_env.Depends(pyc, dep_lib)
29    local_env.Install(pyinstall+'/bruce', pyc)
30    
31    # get all the python files in the release tar file
32    release_py = [ env.File("SConscript"), ] + [ env.File(x) for x in python_src ]
33    env.Zip(src_zipfile, release_py)
34    env.Tar(src_tarfile, release_py)

Legend:
Removed from v.268  
changed lines
  Added in v.707

  ViewVC Help
Powered by ViewVC 1.1.26