Issue2165
Created on 2014-06-15.08:47:26 by jeff.allen, last changed 2015-03-02.01:15:20 by zyasoft.
msg8647 (view) |
Author: Jeff Allen (jeff.allen) |
Date: 2014-06-15.08:47:25 |
|
Launching a sub-process is unreliable and fails during regression tests. A simple example is:
>>> import subprocess, sys, os
>>> sys.executable
'C:\\Users\\Jeff\\Documents\\Eclipse\\jython-trunk\\dist\\bin\\jython.bat'
>>> subprocess.call([sys.executable, '-V'])
The input line is too long.
:classpathDefined
was unexpected at this time.
255
The message is from cmd.exe. The label is mostly a red herring, but it is a bit of the jython.bat script just after the java command. This command is very long, and it's mostly to do with JAR files:
>>> len(os.environ["_FULL_CMD"])
4371
>>> os.environ["_FULL_CMD"].count(".jar")
52
This doesn't yet fail in my integration spot, which has a shorter path, but I don't accept that the path to my Eclipse workbench is abnormally long. Users will have the same problem I think.
We get the class path in this command by enumerating dist/javalib. The regrtest runs ok if I delete from there those JARs I suspect are superfluous (old ANTLR JARs, other platform JFFI JARs). However, I worry there may be some tool that needs them. But we could be smarter building the javalib directory.
Nowadays, Java accepts a wildcard in its class path: but we'd need Jython to catch up with that idea, wouldn't we?
|
msg9519 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-13.17:55:37 |
|
To be fixed by #1491
|
msg9530 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-18.18:18:22 |
|
Just re-read msg8647: I wasn't aware of the long standing support for classpath wildcards. I will update the new jython.py accordingly, since it likely faces the same restrictions on subprocess command specification on Windows. It's also easier than the glob step it currently takes.
|
msg9540 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-02-22.06:28:00 |
|
Fixed as of https://hg.python.org/jython/rev/5cda1a50ecf0 with jython.exe wrapping jython.py via PyInstaller (using the standard build).
Not so bad now:
c:\jythondev\jython27>dist\bin\jython --print
"C:\Program Files\Java\jdk1.7.0_55\bin\java" -Xmx512m -Xss1024k -classpath c:\jythondev\jython27\dist\jython-dev.jar;c:\jythondev\jython27\dist\javali
b\* -Dpython.home=c:\jythondev\jython27\dist -Dpython.executable=c:\jythondev\jython27\dist\bin\jython.exe -Dpython.launcher.uname=windows -Dpython.la
uncher.tty=true org.python.util.jython
|
|
Date |
User |
Action |
Args |
2015-03-02 01:15:20 | zyasoft | set | status: pending -> closed |
2015-02-22 06:28:10 | zyasoft | set | status: open -> pending resolution: fixed |
2015-02-22 06:28:01 | zyasoft | set | messages:
+ msg9540 |
2015-02-18 18:18:22 | zyasoft | set | messages:
+ msg9530 |
2015-02-13 17:55:37 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg9519 |
2014-06-15 08:47:26 | jeff.allen | create | |
|