Message9543

Author zyasoft
Recipients fwierzbicki, geoffbache, hpk, otmarhumbel, pekka.klarck, pjenvey, zyasoft
Date 2015-02-22.14:50:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424616641.76.0.218536441005.issue1491@psf.upfronthosting.co.za>
In-reply-to
Content
Please note that the current construction of jython.exe is an overkill, given that it's about 3.6MB between jython.exe and the bundled python27.dll. Writing a launcher in C would definitely be on the order of a few kilobytes. But it's also completely necessary for the moment.

jython.exe is created by using PyInstaller (https://github.com/pyinstaller/pyinstaller/wiki), using the simplest invocation after installing with pip pyinstaller, in src\shell:

C:\Python27\Scripts\pyinstaller jython.py

(or the install directory of CPython, but with Windows, I just stick to the defaults)

This creates a build directory, from which I extracted jython.exe and python27.dll and also placed in src\shell. Someone should write a build script! ;) Note that we cannot bundle PyInstaller itself since it's GPL, but we can freely redistribute its output, much like gcc.

So if you look at the src/shell/jython.py (-> bin/jython.py), you will notice a very simple Python script. It would be simple in principle to translate this into C, and shave off the 3.6MB it currently costs. But I am not a Windows developer, so this needs to be done by someone who is interested in dealing with all the details, including unicode args on the command line, along with supporting cygwin.

Of course there's no reason for jython.exe and python27.dll to be installed for non Windows systems, so that can be fixed in the Jython installer.

One more thing: having a Python launcher means we can readily do things like prewarmed/recycled VMs, but with security - at least on systems supporting domain sockets (not certain if named pipes on Windows work sufficiently). But that's a future feature, for 2.7.1 or later.
History
Date User Action Args
2015-02-22 14:50:41zyasoftsetmessageid: <1424616641.76.0.218536441005.issue1491@psf.upfronthosting.co.za>
2015-02-22 14:50:41zyasoftsetrecipients: + zyasoft, otmarhumbel, fwierzbicki, pekka.klarck, pjenvey, hpk, geoffbache
2015-02-22 14:50:41zyasoftlinkissue1491 messages
2015-02-22 14:50:41zyasoftcreate