Re: pip-related option -J-Dcpython_cmd

Stefan Richthofer <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CACQYzF+X-iPfu7Qktyxpc9RdZJK8PE=3EaKvyOUbch=cvqddfQ@mail.gmail.com>
Hey Jeff,

indeed I intended at that time to get eventually back to this and find a
better solution
("Todo: Resolve this discrepancy!"). Then there were other priorities...
A prototype use case is to let things like this genereate some required
pyc-files smoothly:

pip install --global-option="-J-Dcpython_cmd=python" sympy

If that works with the Windows launcher now, it should be fine to
remove the special case.
I think I originally thought about solving this by making the options
parser smarter, e.g.
atomatically sort out -J options regardless where they occur. That
would move some logic
from platform dependent launchers into the platform independent Java
code -> easier to maintain.

Anyway. If it works fine now with the launchers I think there is no
priority to move things around now.

-Stefan


Am Mi., 29. Aug. 2018 um 00:58 Uhr schrieb Jeff Allen <[email protected]>:

> HI Stefan:
>
> I'm rationalising the Jython main program and the options parser, and I'm
> looking at the code added by this change:
>
> https://hg.python.org/jython/rev/03f4808038f8#l3.8
>
> which is clearly a work-around you seemed to intend be resolved another
> way eventually. It deals as a specific case with the option
> -J-Dcpython_cmd=python, which ends up as a Jython argument when using pip
> with --global-options. (That's if I've understood correctly.) Am I right
> in thinking this is a specific case of a general problem when Java options
> mix with Python ones (observed here in 2.7.1):
>
> PS startup2> jython -E -J-Dtest=TEST
> Unknown option: J-Dtest=TEST
> usage: ...
>
> Since that time, and with an unconnected motive, I've changed the Windows
> launcher so that it shuffles recognisable Python options and Java options
> (-J<stuff>) to their proper places. (
> https://hg.python.org/jython/rev/b556dcdf8258) In the tip now, I get:
>
> PS jython-trunk> dist\bin\jython -E -J-Dtest=TEST -c "import sys; print sys.registry.getProperty('test')"
> TEST
>
> Do you think this means I can I safely omit the special case from the
> options parser?
>
> Jeff
>
> --
> Jeff Allen
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jython-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jython-dev
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.