Re: LiJy-launch
Jim Baker <[email protected]>
| Newsgroups | gmane.comp.lang.jython.devel |
|---|---|
| Message-ID | <CAOhO=aNoqL24h_CPkLPMt7FuYkspG0ZQguRTYEfQW5708dLirg@mail.gmail.com> |
On Mon, May 11, 2015 at 9:11 PM, Stefan Richthofer <[email protected] > wrote: > >>My feeling is that we should package dependencies like this, with > different license restrictions, in PyPI, eg we should support > >>pip install lijy > > Can this be done by the Jython installer? The JNI-based launcher should > really be the default (not only because of file-size, but also because of > this subprocess-thing). I would recommend to keep the python-launcher in > form of jython.py too for transparency. LiJy-launch is largely an exact > port of it, augmenting the launch-logic from the source of java.exe. So for > future developer-generations it will be easier to figure out what the > launcher is doing by looking at the python one. > I agree this would be the best, so long as we can avoid any license conflict. Maybe one possibility if we cannot avoid it is that we do the combination in the installer itself - the user can choose an option that immediately does `pip install lijy` I'm also in Vancouver next week for the OpenStack Summit, and I even on a panel ( https://openstacksummitmay2015vancouver.sched.org/event/fec286e14d4a1adb5f38a62f59196112), representing Jython, that's been organized by the PSF's lawyer ;) So I will try to get some good advice on what we can do from Van Lindberg. > >>One problem is that Windows, unlike Unix-like systems, has no built-in > support for replacing a file that is in-use > There is a working "default-solution" for this involving a temporary > bat-file. The method is not beautiful, but works and is frequently proposed > in forums etc. A collegue of mine used this technique successfully in one > of his projects, so I also know it from first hand. > Ah, makes sense. I think that would be a fine solution in this case. > > Then I have some questions about how jython.exe is created from > jython.py. I believe this was done by py2exe, wasn't it? > PyInstaller (https://github.com/pyinstaller/pyinstaller/wiki). However, there is a bug: http://bugs.jython.org/issue2343, which is that PyInstaller overwrites PYTHONPATH. Not so problematic for us, since we currently use JYTHONPATH, but could cause issues for code that passes through Jython. cxFreeze and py2exe are the two other options. > > 1) However, the py2exe-homepage (c.f. > http://www.py2exe.org/index.cgi/Tutorial) says one would have to bundle > MSVCR90.dll, which is not allowed for every VS distribution (e.g. it's not > allowed for VS express). How does Jython solve this? I didn't find an > MSVCR90.dll anywhere in Jython's dist-folder. > Was it statically linked? > So this is causing another issue in jython.exe, because we don't bundle this DLL, only the CPython 2.7 DLL. In certain cases, the C runtime DLLs are not available. It was mentioned on #jython with respect to running under Jenkins on Windows. I will try to find the link to the log text, but no bug was filed. > (For LiJy-launch I will try to build with VS 2010, so it can hopefully use > MSVCR100.dll, which is bundeled with Java7 and 8, or use win32 API for > basic stuff, so that kernel32.dll might be sufficient. If nothing works > out, I can still use mingw.) > > 2) How does this work regarding 32/64 bit? Is it actually possible to > control whether py2exe produces 32 or 64 bit executable? > Setting JAVA_HOME works, see http://bugs.jython.org/issue2353 > Is jython.exe a 32 bit executable that also runs on 64 bit systems? > Yes, I do that all of the time in my testing. It works because jython.exe calls java via a subprocess. > I am not confident that such a solution would be feasible for LiJy-launch, > since it must link to the architecture-dependent java.dll/.so. > So LiJy-launch will most likely come with multiple binaries (at least one > for 32 and 64 bit each). Can pip resolve this? > I believe this architectural issue should be resolvable with wheel support, indeed supporting different architectures for installations is one of the main design goals for wheels. - Jim ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Jython-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-dev