ProdriveTechnologies / bazel-latex

Bazel build system rules for LaTeX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

latexrun file is not executable when building

fsareshwala opened this issue · comments

The bazel latex build was failing because the latexrun_file was not executable, resulting in a traceback like this:

Traceback (most recent call last):
  File "external/bazel_latex/run_lualatex.py", line 62, in <module>
    env=env,
  File "/usr/lib64/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
Target //intro_cpp:syllabus failed to build

The latexrun_file is not executable and expects that python3 be put in front it, though it has a #!/usr/bin/env python3 shebang at the top of the file. I've fixed this locally by appending a python3 command in front of the latexrun_file argument in the subprocess.call(...). Opening this issue to hopefully get this fixed in the code itself.

Potentially fixed in #26 but not sure if that's the way you would prefer to go.