You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLAMP's find_jython_jars routine is messed up (and completely bogus against current jython-ssl tree).
Instead of implementing bad logic to find jars based upon an arbitrary executable path, just search the current classpath. It is not clamp's responsibility to call jython correctly - this is already done by the callee or wrapper script, and everything necessary is already on that classpath.
The text was updated successfully, but these errors were encountered:
find_jython_jars is based on comparable functionality in the jython shell script/jython.bat for setting up the classpath. At least in my testing on Ubuntu and OSX, it works with the jython-ssl branch, since Clamp is not so useful without at least easy_install support (currently, only jython-ssl supports easy_install, although https://github.com/jimbaker/socket-reboot should hopefully fix this real soon now :), just a bit more work).
But what I think will be a much better solution is if the desired jars to be copied in are passed into the singlejar command. There is in fact some support for this idea in the current --classpath option, but it's not really the right approach as used there. In particular, Clamp now picks up all jars that are included in the clamped code through a discovery approach and ensures these are added to sys.path.
So let's take advantage of the warning about being "pre-alpha, API subject to change" and have the --classpath option set exclusively all jars to be included besides what's discovered in clamped packages. In particular, with --classpath set the find_jython_jars function will not be run.
There were three problem areas I noted after I managed to get this working (currently shim fixes only in my local branch):
find_jython_jars && find_jython_lib_files in clamp.build
The third area was a general set of pathing problems in Jython, I will report an issue against Jython rather than against clamp. However the functions in question are:
isStandalone in org.python.core.PySystemState
and makeBundle in org.python.modules.zipimport.zipimporter
CLAMP's find_jython_jars routine is messed up (and completely bogus against current jython-ssl tree).
Instead of implementing bad logic to find jars based upon an arbitrary executable path, just search the current classpath. It is not clamp's responsibility to call jython correctly - this is already done by the callee or wrapper script, and everything necessary is already on that classpath.
The text was updated successfully, but these errors were encountered: