Mercurial > libervia-web
comparison setup.py @ 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 | 5264fec78a1d |
children | 3d372805f60c |
comparison
equal
deleted
inserted
replaced
904:f794b1c17485 | 905:09b0a968a36a |
---|---|
153 elif CLEAN_OPT in install_opt: | 153 elif CLEAN_OPT in install_opt: |
154 self.clean() | 154 self.clean() |
155 install.run(self) | 155 install.run(self) |
156 sys.stdout.write('running post installation stuff\n') | 156 sys.stdout.write('running post installation stuff\n') |
157 sys.stdout.flush() | 157 sys.stdout.flush() |
158 build_result = self.pyjs_build() # build after libervia.common is accessible | 158 try: |
159 if build_result == 127: # TODO: remove magic string | 159 build_result = self.pyjs_build() # build after libervia.common is accessible |
160 except OSError as e: | |
161 print "can't run pyjsbuild, are you sure pyjamas is installed?\nexception: {}".format(e) | |
162 return | |
163 if build_result == 127: # TODO: remove magic string # FIXME: seems useless as an OSError is raised if pyjsbuild is not accessible | |
160 print "pyjsbuild is not installed or not accessible from the PATH of user '%s'" % os.getenv('USERNAME') | 164 print "pyjsbuild is not installed or not accessible from the PATH of user '%s'" % os.getenv('USERNAME') |
161 return | 165 return |
162 if build_result != 0: | 166 if build_result != 0: |
163 print "pyjsbuild failed to build libervia" | 167 print "pyjsbuild failed to build libervia" |
164 return | 168 return |