/[ascend]/branches/python3/pygtk/SConscript
ViewVC logotype

Contents of /branches/python3/pygtk/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3506 - (show annotations) (download)
Wed Mar 8 23:02:10 2023 UTC (6 months, 2 weeks ago) by jpye
File size: 1498 byte(s)
solving ascxx compile issues in MSYS2 (maybe breaks other things)

1 #!/usr/bin/env python
2 Import('env')
3
4 import platform
5
6 #---------------------------------------------
7 # CONFIG & runtime shell script for posix
8
9 configpy = env.Substfile(source='config.py.in')
10
11 ascendcmd = env.Substfile(source='ascend.in')
12 env.AddPostAction(ascendcmd, 'chmod 755 $TARGET')
13
14 if platform.system() != "Windows" or 'IS_MINGW' in env:
15 envdev = env.Clone()
16 # add 'WITH_SOLVERS' to the SUBST_DICT used by ascdev...
17 envdev['SUBST_DICT']['@WITH_SOLVERS@'] = ",".join(env.get('WITH_SOLVERS'))
18 ascdevcmd = envdev.Substfile(source='ascdev.in')
19 env.AddPostAction(ascdevcmd, 'chmod 755 $TARGET')
20
21 #---------------------------------------------
22 # INSTALLATION
23
24 # python compile bytecode
25
26 import py_compile
27 def pyc_build(target, source, env):
28 py_compile.compile(str(source[0]),str(target[0]),"",True)
29 return None
30 env.Append(BUILDERS = {'PYC' : Builder(action = pyc_build,suffix='.pyc',src_suffix='.py')})
31
32 if env.get('CAN_INSTALL'):
33 env.InstallProgram(Dir(env.subst("$INSTALL_ROOT$INSTALL_BIN")),ascendcmd)
34
35 import glob
36 pythonfiles = glob.glob("*.py")
37
38 pythonpycs = []
39 for f in pythonfiles:
40 pythonpycs.append( env.PYC(f) )
41
42 for f in pythonfiles + pythonpycs:
43 env.InstallShared(Dir(env.subst("$INSTALL_ROOT$INSTALL_PYTHON_ASCEND")),f)
44
45 env.InstallShared(Dir(env.subst("$INSTALL_ROOT$INSTALL_PYTHON_ASCEND")),"config.py")
46
47 gladefiles = glob.glob("glade/*")
48 env.InstallShared(Dir(env.subst("$INSTALL_ROOT$INSTALL_ASCDATA/glade")),gladefiles)
49
50 # vim: ts=4:sw=4:noet:syntax=python

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22