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

Installed jep script contains syntax errors #383

Closed
seletz opened this issue Mar 11, 2022 · 1 comment · Fixed by #384
Closed

Installed jep script contains syntax errors #383

seletz opened this issue Mar 11, 2022 · 1 comment · Fixed by #384

Comments

@seletz
Copy link
Contributor

seletz commented Mar 11, 2022

Describe the problem

After installing, the generated jet binary contains syntax errors wrt exporting the PYTHONEXECUTABLE env var.

Search for existing solutions

None found. PR follows.

Environment (please complete the following information):

$ uname -a
Darwin NewEden 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64
$ python --version
Python 3.7.6
$ java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)

No additional packages, clean python env.

Logs

via 🐍 v3.7.6 (jep) ❯ python setup.py install
numpy not found, running without numpy support
running install
running build
running setup_java
running build_java
running build_jar
running build_py
running build_ext
running build_scripts
copying and adjusting src/main/scripts/jep -> build/scripts-3.7
changing mode of build/scripts-3.7/jep from 644 to 755
running install_lib
copying build/lib.macosx-10.15-x86_64-3.7/jep/jep.cpython-37m-darwin.so -> /Users/seletz/develop/research/jep/lib/python3.7/site-packages/jep
copying build/java/jep-4.0.2.jar -> /Users/seletz/develop/research/jep/lib/python3.7/site-packages/jep
ln -sf jep.cpython-37m-darwin.so /Users/seletz/develop/research/jep/lib/python3.7/site-packages/jep/libjep.jnilib
running install_scripts
copying build/scripts-3.7/jep -> /Users/seletz/develop/research/jep/bin
changing mode of /Users/seletz/develop/research/jep/bin/jep to 755
running install_egg_info
Removing /Users/seletz/develop/research/jep/lib/python3.7/site-packages/jep-4.0.2-py3.7.egg-info
Writing /Users/seletz/develop/research/jep/lib/python3.7/site-packages/jep-4.0.2-py3.7.egg-info

jep on fix-export-syntax-for-pythonexecutable [$]
via 🐍 v3.7.6 (jep) ❯ which jep
/Users/seletz/develop/research/jep/bin/jep

jep on fix-export-syntax-for-pythonexecutable [$]
via 🐍 v3.7.6 (jep) ❯ jep
/Users/seletz/develop/research/jep/bin/jep: line 4: export: `=': not a valid identifier
/Users/seletz/develop/research/jep/bin/jep: line 4: export: `/Users/seletz/develop/research/jep/bin/python': not a valid identifier
jep.JepException: <class 'ModuleNotFoundError'>: No module named 'jep'
        at <string>.<module>(<string>:1)
        at jep.Jep.eval(Native Method)
        at jep.Jep.eval(Jep.java:312)
        at jep.Jep.configureInterpreter(Jep.java:179)
        at jep.SharedInterpreter.configureInterpreter(SharedInterpreter.java:64)
        at jep.Jep.<init>(Jep.java:159)
        at jep.SharedInterpreter.<init>(SharedInterpreter.java:56)
        at jep.Run.run(Run.java:49)
        at jep.Run.main(Run.java:146)
seletz added a commit to seletz/jep that referenced this issue Mar 11, 2022
This PR fixes shell syntax of the generated `jep` binary.

Shell does not like blanks around the "=".  Also, it seems appropriate
to quote the path in case of paths with blanks.

Fixes ninia#383.
See also ninia#382.
seletz added a commit to seletz/jep that referenced this issue Mar 11, 2022
This PR fixes shell syntax of the generated `jep` binary.

Shell does not like blanks around the "=".  Also, it seems appropriate
to quote the path in case of paths with blanks.

Fixes ninia#383.
See also ninia#382.
@ndjensen
Copy link
Member

Thank you for finding this, tracking it down, reporting it, and fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants