From: David C. <dav...@gm...> - 2016-02-23 18:16:22
|
Here I am, reporting back as I now have *working* Sphinx documentation for my Jython+JavaFX project! Thank you for your support. The root issue seems to have been the OS. I upgraded the server from Ubuntu 12.04.5 to Ubuntu 14.04.4 and was able to install Jython 2.7.0 without the 'passwd.pw_passwd' exception. After the fact, I discovered that I was using this java: $ java -version java version "1.7.0_95" OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) And that the JAVA_HOME environment variable was unset. I was able to install Sphinx1.3.3 into this Jython instance and generate my documentation after overcoming only a few additional obstacles. 1. os.makedirs() failed for me. I replaced the default implementation of os.makedirs() in $JYTHON_HOME/Lib/os.py with this and was able to keep moving: import java.io.File return java.io.File(name).mkdirs() My own failure of os.makedirs() looked exactly like this issue: http://bugs.jython.org/issue1885 2. To get my JavaFX-dependent modules to import, I had to do some hackery on the headless server to ensure that the JavaFX runtime was already running, and running in headless mode with Monocle. (But, that has nothing to do with Jython.) Thanks again for your support and for the great platform that is Jython. This story has a happy ending. David On Tue, Jan 12, 2016 at 8:03 AM, David Charles <dav...@gm...> wrote: > Jim, > > Thanks for commenting. It works for me too *on my laptop*. It does not > work for me on *the virtual machine provided by my employer*, which I now > see is 'Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-77-generic x86_64)'. > > Perhaps I should upgrade that (virtual) box to 14.04.2 LTS before > bothering this list any further. > > Just in case it is useful, here are the results of my attempts to install > several different versions of Jython that I just happened to have laying > around on the virtual machine: > > ./installjython jython-installer-2.7.0.jar $HOME/jython2.7.0 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7.1b1.jar $HOME/jython2.7.1b1 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7.1b2.jar $HOME/jython2.7.1b2 # FAIL: > passwd.pw_passwd > ./installjython jython-installer-2.7-b2.jar $HOME/jython2.7b2 # PASS > ./installjython jython-installer-2.7-b4.jar $HOME/jython2.7b4 # PASS > > And, here are the results of my attempts to install Sphinx into each of > the previous attempted installations. > > ./installsphinx $HOME/jython2.7.0 # FAIL: umask > ./installsphinx $HOME/jython2.7.1b1 # FAIL: umask > ./installsphinx $HOME/jython2.7.1b2 # FAIL: umask > ./installsphinx $HOME/jython2.7b2 # FAIL: CERT_REQUIRED > ./installsphinx $HOME/jython2.7b4 # FAIL: umask > > $JAVA_HOME/bin/java -version responds as expected. I did not try > unsetting JAVA_HOME, as /usr/bin/java is version 1.6.0_34. > > Thanks again, > David > > > On Mon, Jan 11, 2016 at 4:50 PM, Jim Baker <jim...@py...> wrote: > >> David, >> >> First, it works for me, running against 2.7.1 master. So let's see what >> we have here. I think you have two separate issues: >> >> 1. Installing Jython, with pip support. We have been making progress on >> updating various aspects of Jython 2.7.1 master so that it supports latest >> pip/setuptools. (Although I think it would work with 2.7.0 final.) But to >> me, your problems look more of an issue with the Jython installer (see >> http://bugs.jython.org/issue2346). I would check the following >> >> $JAVA_HOME/bin/java -version >> >> If that test above doesn't work, you have a JAVA_HOME set so that it does >> NOT works with Jython 2.7. ( FWIW, unsetting JAVA_HOME usually is the >> easiest choice.) >> >> 2. Using Sphinx. We have some broken unit tests in Sphinx ( >> http://bugs.jython.org/issue2288), but I don't think these really matter >> for Sphinx users; instead they are more useful for Jython developers to >> identify good edge cases. >> >> So for my realistic test case, I tried running Sphinx on Jython against >> the source of the Jython book, https://github.com/jython/book. After >> setting up a minimal conf.py, that worked just fine. (Note we will still >> need to translate some of the directives in the concurrency chapter I >> wrote, but that also occurs with http://jython.readthedocs.org/en/latest/, >> which probably uses CPython to run Sphinx.) >> >> - JimI have JAVA_HOME pointing >> >> On Wed, Jan 6, 2016 at 2:25 PM, David Charles <dav...@gm... >> > wrote: >> >>> I have made a little progress: The IOException goes away if I pass a >>> full, absolute path to -d >>> >>> Next problem, my installation of Jython 2.7.1b2 fails with a different >>> error: >>> >>> $ java -jar jython-installer-2.7.1b2.jar -s -d $JYTHON_HOME >>> Performing silent installation >>> 10 % >>> 20 % >>> 30 % >>> 40 % >>> 50 % >>> 60 % >>> 70 % >>> Generating start scripts ... >>> Installing pip and setuptools >>> 90 % >>> ...lots of output... >>> [Loaded jnr.posix.JavaPasswd from file:/home/me/jython2.7.1b2/jython.jar] >>> Traceback (most recent call last): >>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 161, in >>> _run_module_as_main >>> return _run_code(code, main_globals, None,I have JAVA_HOME pointing >>> File "/home/c11319/jython2.7.1b2/Lib/runpy.py", line 72, in _run_code >>> exec code in run_globals >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__main__.py", line 4, >>> in <module> >>> ensurepip._main() >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 220, >>> in _main >>> bootstrap( >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 123, >>> in bootstrap >>> _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) >>> File "/home/c11319/jython2.7.1b2/Lib/ensurepip/__init__.py", line 45, >>> in _run_pip >>> import pip >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", >>> line 10, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/util.py", line >>> 17, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 109, in <module> >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 71, in _get_build_prefix >>> File "/tmp/tmpvmUCiQ/pip-1.6-py2.py3-none-any.whl/pip/locations.py", >>> line 66, in __get_username >>> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 60, in getpwuid >>> return struct_passwd(entry) >>> File "/home/c11319/jython2.7.1b2/Lib/pwd.py", line 36, in __new__ >>> pwd = (newStringOrUnicode(pwd.loginName), >>> newStringOrUnicode(pwd.password), int(pwd.UID), >>> NotImplementedError: passwd.pw_passwd unimplemented >>> 100 % >>> Congratulations! You successfully installed Jython 2.7.1b2 to directory >>> /home/c11319/jython2.7.1b2. >>> >>> This appears to be the same issue reported here: >>> >>> * http://bugs.jython.org/issue2333 >>> >>> Try as I might, I cannot get past this. Moreover, I do not understand >>> the error, as I do not see any attempt to access passwd.pw_passwd in the >>> offending line (pwd.py:36). Perhaps that is a clue? >>> >>> This is my environment: >>> >>> $ export | grep -e JAVA -e JYTHON >>> declare -x JAVA_ENCODING="UTF-8" >>> declare -x JAVA_HOME="/usr/local/jdk1.8.0_66" >>> declare -x JAVA_MEM="512m" >>> declare -x JAVA_OPTS="-verbose" >>> declare -x JAVA_STACK="-Xss1024k" >>> declare -x JYTHON_HOME="/home/me/jython2.7.1b2" >>> declare -x JYTHON_OPTS="-v" >>> >>> As an aside: I thought it strange that I had to put '-Xss' into >>> JAVA_STACK, but I did not have to put '-Xmx' into JAVA_MEM. Without the >>> '-Xss' prefix in JAVA_STACK, my 1024k was interpreted to be a main class. >>> >>> David >>> >>> >>> On Wed, Jan 6, 2016 at 1:03 PM, Quanah Gibson-Mount <qu...@zi...> >>> wrote: >>> >>>> --On Wednesday, January 06, 2016 12:45 PM -0700 David Charles < >>>> dav...@gm...> wrote: >>>> >>>> >>>>> >>>>> I just tried it. Jython2.7.1b2+Sphinx-1.3.3 appears to fail in >>>>> precisely the same ways. >>>>> >>>> >>>> Damn, it was worth a shot. :/ >>>> >>>> I notice the original bug <http://bugs.jython.org/issue2349> notes >>>> other env variables may require being set outside of JAVA_HOME >>>> (comment#4). Have you looked at setting them in addition to JAVA_HOME? >>>> >>>> >>>> --Quanah >>>> >>>> >>>> -- >>>> >>>> Quanah Gibson-Mount >>>> Platform Architect >>>> Zimbra, Inc. >>>> -------------------- >>>> Zimbra :: the leader in open source messaging and collaboration >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Jython-users mailing list >>> Jyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/jython-users >>> >>> >> > |