--- trunk/finley/py_src/SConscript 2005/12/19 06:11:32 384 +++ trunk/finley/py_src/SConscript 2006/03/27 02:43:09 682 @@ -1,27 +1,14 @@ -pyinstall = None - Import('*') -import os -import sys - -extensions_dir = str(esysroot) + '/scons' -sys.path.append(extensions_dir) +local_env=env.Copy() -import scons_extensions +src_dir = local_env.Dir('.').srcnode().abspath -finleypy_env = Environment(ENV = os.environ) - -py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True) -finleypy_env.Append(BUILDERS = {'PyCompile' : py_builder}); - -python_src = ['__init__.py', - 'finley.py', - 'finleybench.py'] +import os +filenames = os.listdir(src_dir) +python_src = [x for x in filenames if os.path.splitext(x)[1] in ['.py']] -pyc = finleypy_env.PyCompile(python_src) +pyc = local_env.PyCompile(python_src) -Default(finleypy_env.Install(pydir, pyc)) -Default(finleypy_env.Install(pydir2, pyc)) -if pyinstall != None: - Default(finleypy_env.Install(pyinstall, pyc)) +local_env.Depends(pyc, dep_lib) +local_env.Install(pyinstall+'/finley', pyc)