fork of capisuite (https://github.com/larsimmisch/capisuite) with some fixes to make it build on modern Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
capisuite/scripts/SConscript

57 lines
1.8 KiB

# -*- python -*-
Import('env')
def py_compile(target, source, env):
"""compile python modules for .../python2.x/site-packages/"""
# Note: this differs from #/capisuite/SConscript.py_compile in 'dfile'
import py_compile, os.path
py_compile.compile(source[0].abspath,
#cfile=target[0].abspath,
dfile = os.path.join(env.subst('$python_moduledir'),
env.subst('$SOURCE.file')),
)
# these are meant to be used by users
user_scripts = [env.FileSubst('capisuitefax', 'capisuitefax.in'),]
env.AddPostAction(user_scripts, Chmod('$TARGETS', 0755))
# these are meant to be used by the admin
sbin_scripts = [
env.FileSubst('capisuite-checkconfig', 'capisuite-checkconfig.in'),
]
env.AddPostAction(sbin_scripts, Chmod('$TARGETS', 0755))
# config files
configs = [
env.FileSubst('fax.conf', 'fax.confin'),
env.FileSubst('answering_machine.conf', 'answering_machine.confin')
]
# file subst. is required because of sfftobmp_major_version
env.FileSubst('cs_helpers.py', 'cs_helpers.pyin')
pymodules = []
for mod in Split('cs_helpers'):
pymodules.append(mod+'.py')
pymodules.append(env.Command(mod + '.pyc', mod+'.py', py_compile))
#--- install ---
env.Alias('install-pylib', env.Install('$python_moduledir', pymodules))
for i in (
env.Install('$pkgbindir', user_scripts),
env.Install('$pkgsbindir', sbin_scripts),
env.Install('$pkglibdir', Split('idle.py incoming.py'))
):
env.Alias('install-scripts', i)
for i in (
env.Install('$python_moduledir', pymodules),
env.Install('$pkgsysconfdir', configs),
env.Install('$pkglibdir', 'README'),
):
env.Alias('install', i)
# this also includes 'install-pylib' and 'install-scripts'
# (set in #/SConstruct)