Message10182
The problem originates in the fact that sys.executable is None if
Jython was started via java -cp jython.jar org.python.util.jython
This makes the line
project_base = os.path.dirname(os.path.realpath(sys.executable))
in sysconfig.py fail.
While it might be intended behavior that sys.executable is None
in this case, to indicate that no Jython-launcher was used, I
think importing sysconfig from distutils should still work.
So I see two ways to improve this situation
(maybe we should even apply both):
1) Set sys.executable to some sane value even if no launcher was used.
Any suggestions what this should be? Path to java-executable?
2) Fix the line
project_base = os.path.dirname(os.path.realpath(sys.executable))
such that it has a fallback in case that sys.executable is None.
E.g. it could parse System.getProperty('java.class.path') to find
the location of jython.jar and infer the launcher-directory from
that path, i.e. by adding "/bin" to the base path of jython.jar. |
|
Date |
User |
Action |
Args |
2015-08-30 12:40:19 | stefan.richthofer | set | recipients:
+ stefan.richthofer |
2015-08-30 12:40:19 | stefan.richthofer | set | messageid: <1440938419.31.0.469798209309.issue2386@psf.upfronthosting.co.za> |
2015-08-30 12:40:19 | stefan.richthofer | link | issue2386 messages |
2015-08-30 12:40:18 | stefan.richthofer | create | |
|