Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_lualatex: fix running a non-executable python file #23 #26

Closed
wants to merge 1 commit into from
Closed

Conversation

fsareshwala
Copy link
Contributor

@fsareshwala fsareshwala commented Oct 13, 2019

This change appends a python3 command prefix in the subprocess.call(...) to ensure that the latexrun_file will be executed. For some reason, it is not executable and we need to make sure that it either is or somehow otherwise finds the python3 interpreter.

@IljaKroonen
Copy link

Another possible way of fixing it:

Selmaai@1ba1fb0

Alternatively (and this way sounds less hacky to me), the file could also be used in a bazel py_binary rule, and then bazel-latex could run that instead of the file. But i'm unsure what the implications are, particularly in terms of python version.

@Kernald
Copy link
Collaborator

Kernald commented Oct 22, 2019

py_binary has a python_version attribute, that accepts either PY2 or PY3. This looks like a better way to address the issue indeed.

@fsareshwala
Copy link
Contributor Author

I will defer to the experts as to the best way to fix the python 3 versioning issue. I opened this pull request because I was having this problem. Feel free to close it out and implement it the correct way, let me know how you would like it to be implemented, or merge it as is. I'm good with anything.

regisd added a commit to jflex-de/jflex that referenced this pull request Nov 5, 2019
* Fix #570. Build broken on Cirrus by upgrade to Bazel v1.0
  * The `single_file` attribute has been replaced by `allow_single_file`.
    Use **bazel_rules** v4 which fixed this. jflex-de/bazel_rules#13
  * add `--incompatible_depset_union=false`
    bazel_pandoc ProdriveTechnologies/bazel-pandoc#6 needs to update for incompatible_depset_union bazelbuild/bazel#5817
  * Use ProdriveTechnologies/bazel-latex#26 because `run_lualatex.py` is not executable
  * In deps, use `https` rather than `http`
* Fix build broken on Travis due to upgrade to Xenial
  * Use openjdk11 because whatever I ask for, that's what I get.
  * Upgrade maven-compiler-plugin to 3.8.0 to fix _class file has wrong version 55.0, should be 53.0_
  * Fix maven-compiler-plugin config for ErrorProne
  * Fix config of maven-javadoc-plugin for newer JDK. https://bugs.openjdk.java.net/browse/JDK-8212233
  * In aggregated sources, update to JDK8 because Xenial doesn't support JDK7 anymore.
    Add manual dep on **javax-annotations.jar** because because JDK8 doesn't provide it anymore.
  * Remove the task that builds the docs because `\tightlist` is not known. #571
regisd pushed a commit to jflex-de/jflex that referenced this pull request Nov 5, 2019
Author: Régis Décamps <regisd@google.com>
Date:   Tue Nov 5 11:16:01 2019 +0100

    Fix the build (#569)

    * Fix #570. Build broken on Cirrus by upgrade to Bazel v1.0
      * The `single_file` attribute has been replaced by `allow_single_file`.
        Use **bazel_rules** v4 which fixed this. jflex-de/bazel_rules#13
      * add `--incompatible_depset_union=false`
        bazel_pandoc ProdriveTechnologies/bazel-pandoc#6 needs to update for incompatible_depset_union bazelbuild/bazel#5817
      * Use ProdriveTechnologies/bazel-latex#26 because `run_lualatex.py` is not executable
      * In deps, use `https` rather than `http`
    * Fix build broken on Travis due to upgrade to Xenial
      * Use openjdk11 because whatever I ask for, that's what I get.
      * Upgrade maven-compiler-plugin to 3.8.0 to fix _class file has wrong version 55.0, should be 53.0_
      * Fix maven-compiler-plugin config for ErrorProne
      * Fix config of maven-javadoc-plugin for newer JDK. https://bugs.openjdk.java.net/browse/JDK-8212233
      * In aggregated sources, update to JDK8 because Xenial doesn't support JDK7 anymore.
        Add manual dep on **javax-annotations.jar** because because JDK8 doesn't provide it anymore.
      * Remove the task that builds the docs because `\tightlist` is not known. #571

Updated from target/jflex-parent-1.8.0-SNAPSHOT-sources.jar
@patbro
Copy link
Member

patbro commented Nov 11, 2019

I will defer to the experts as to the best way to fix the python 3 versioning issue. I opened this pull request because I was having this problem. Feel free to close it out and implement it the correct way, let me know how you would like it to be implemented, or merge it as is. I'm good with anything.

Thanks a lot for contributing! I just implemented the chmod +x as referenced by @IljaKroonen

@patbro patbro closed this Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants