1 |
|
import os |
2 |
Import('*') |
Import('*') |
3 |
|
|
4 |
local_env=env.Copy() |
local_env=env.Copy() |
5 |
|
|
6 |
|
# |
7 |
|
# get the relevant file names: |
8 |
|
# |
9 |
src_dir = local_env.Dir('.').srcnode().abspath |
src_dir = local_env.Dir('.').srcnode().abspath |
|
|
|
|
import os |
|
10 |
filenames = os.listdir(src_dir) |
filenames = os.listdir(src_dir) |
|
python_src = [x for x in filenames if os.path.splitext(x)[1] in ['.py']] |
|
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) |
pyc = local_env.PyCompile(python_src) |
17 |
|
|
18 |
local_env.Depends(pyc, dep_lib) |
local_env.Depends(pyc, dep_lib) |
19 |
local_env.Install(pyinstall+'/bruce', pyc) |
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) |