# HG changeset patch # User Goffi # Date 1468442585 -7200 # Node ID 09b0a968a36a0bb6c9830fefd79436f15a293cdc # Parent f794b1c174857246464062d535bb2a1f7216748a installation (setup): fixed OSError when pyjsbuild is not found diff -r f794b1c17485 -r 09b0a968a36a setup.py --- 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: