Mercurial > libervia-web
changeset 905:09b0a968a36a
installation (setup): fixed OSError when pyjsbuild is not found
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Jul 2016 22:43:05 +0200 |
parents | f794b1c17485 |
children | 9949f0940609 |
files | setup.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Wed Jul 13 00:07:20 2016 +0200 +++ b/setup.py Wed Jul 13 22:43:05 2016 +0200 @@ -155,8 +155,12 @@ install.run(self) sys.stdout.write('running post installation stuff\n') sys.stdout.flush() - build_result = self.pyjs_build() # build after libervia.common is accessible - if build_result == 127: # TODO: remove magic string + try: + build_result = self.pyjs_build() # build after libervia.common is accessible + except OSError as e: + print "can't run pyjsbuild, are you sure pyjamas is installed?\nexception: {}".format(e) + return + if build_result == 127: # TODO: remove magic string # FIXME: seems useless as an OSError is raised if pyjsbuild is not accessible print "pyjsbuild is not installed or not accessible from the PATH of user '%s'" % os.getenv('USERNAME') return if build_result != 0: