Permalink
Browse files

Fix from issue #556 : CanvasProcessing.py does not compile

Thanks to Gabriel Jacobo
  • Loading branch information...
1 parent 35e802c commit 271a8aa2344cabe34680d4d345975012242ebeea Kees Bos committed Mar 3, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 pyjs/src/pyjs/linker.py
  2. +1 −1 pyjs/src/pyjs/translator.py
View
@@ -107,15 +107,15 @@ def out_translate(platform, file_names, out_file, module_name,
opts = ["--module-name", module_name,
"-o", out_file.replace(" ", r"\ "),
] + get_translator_opts(translator_args) + file_names
- opts = [pyjs.PYTHON] + ['translator.py'] + opts
+ opts = [pyjs.PYTHON] + [os.path.join(pydir, 'translator.py')] + opts
pyjscompile_cmd = ' '.join(opts)
#print pyjscompile_cmd - use this to create Makefile code-fragment
proc = subprocess.Popen(pyjscompile_cmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
- cwd=pydir,
+ cwd=os.path.dirname(file_names[0]),
env=os.environ
)
stdout_value, stderr_value = proc.communicate('')
@@ -524,7 +524,7 @@ def jsinclude(self, translator, node, *args, **kwargs):
data = open(node.args[0].value, 'r').read()
except IOError, e:
raise TranslationError(
- "Cannot include file '%s': %s" % (node.args[0].value, e))
+ "Cannot include file '%s': %s" % (node.args[0].value, e), node.node)
translator.ignore_debug = True
return data, False
else:

0 comments on commit 271a8aa

Please sign in to comment.