comparison setup.py @ 732:9596da27cd7c

install: added jsdebug option to use debug mode with pyjsbuild, don't use it by default
author Goffi <goffi@goffi.org>
date Mon, 09 Nov 2015 18:26:05 +0100
parents b2465423c76e
children 0af8a88ef6cd
comparison
equal deleted inserted replaced
731:47c21905e002 732:9596da27cd7c
55 55
56 NAME = 'libervia' 56 NAME = 'libervia'
57 LAUNCH_DAEMON_COMMAND = 'libervia' 57 LAUNCH_DAEMON_COMMAND = 'libervia'
58 58
59 ENV_LIBERVIA_INSTALL = "LIBERVIA_INSTALL" # environment variable to customise installation 59 ENV_LIBERVIA_INSTALL = "LIBERVIA_INSTALL" # environment variable to customise installation
60 JS_DEBUG = "jsdebug" # use debug mode with pyjsbuild
60 NO_PREINSTALL_OPT = 'nopreinstall' # skip all preinstallation checks 61 NO_PREINSTALL_OPT = 'nopreinstall' # skip all preinstallation checks
61 AUTO_DEB_OPT = 'autodeb' # automaticaly install debs 62 AUTO_DEB_OPT = 'autodeb' # automaticaly install debs
62 CLEAN_OPT = 'clean' # remove previous installation directories 63 CLEAN_OPT = 'clean' # remove previous installation directories
63 PURGE_OPT = 'purge' # remove building and previous installation directories 64 PURGE_OPT = 'purge' # remove building and previous installation directories
64 65
118 import sat, sat_frontends, libervia 119 import sat, sat_frontends, libervia
119 os.symlink(os.path.dirname(sat.__file__), os.path.join(tmp_dir,"sat")) # FIXME: only work on unixes 120 os.symlink(os.path.dirname(sat.__file__), os.path.join(tmp_dir,"sat")) # FIXME: only work on unixes
120 os.symlink(os.path.dirname(sat_frontends.__file__), os.path.join(tmp_dir,"sat_frontends")) # FIXME: only work on unixes 121 os.symlink(os.path.dirname(sat_frontends.__file__), os.path.join(tmp_dir,"sat_frontends")) # FIXME: only work on unixes
121 os.symlink(os.path.dirname(libervia.__file__), os.path.join(tmp_dir,"libervia")) # FIXME: only work on unixes 122 os.symlink(os.path.dirname(libervia.__file__), os.path.join(tmp_dir,"libervia")) # FIXME: only work on unixes
122 for module in ('libervia_main', 'libervia_test'): 123 for module in ('libervia_main', 'libervia_test'):
123 result = subprocess.call(['pyjsbuild', module, '-d', '--no-compile-inplace', '-I', tmp_dir, '-o', self.pyjamas_output_dir]) 124 build_args = ['pyjsbuild', module] + (['-d'] if JS_DEBUG in install_opt else []) + ['--no-compile-inplace', '-I', tmp_dir, '-o', self.pyjamas_output_dir]
125 result = subprocess.call(build_args)
124 if result != 0: 126 if result != 0:
125 continue 127 continue
126 shutil.rmtree(tmp_dir) 128 shutil.rmtree(tmp_dir)
127 os.chdir(cwd) 129 os.chdir(cwd)
128 return result 130 return result