Description of problem: I installed jython and jython-manual and started to follows some of the examples. The package dbexts is mentioned so I started jython interactively and did the following >>> from dbext import dbext Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named dbext >>> from dbexts import dbexts Traceback (innermost last): File "<console>", line 1, in ? File "/usr/share/jython/Lib/dbexts.py", line 48, in ? File "/usr/share/jython/Lib/re.py", line 7, in ? ImportError: no module named sre sure enough re.py requests sre, but I can't find it anywhere. Version-Release number of selected component (if applicable): jython-javadoc-2.2-0.3.Release_2_2beta1.1jpp.3.fc7 jython-2.2-0.3.Release_2_2beta1.1jpp.3.fc7 jython-demo-2.2-0.3.Release_2_2beta1.1jpp.3.fc7 jython-manual-2.2-0.3.Release_2_2beta1.1jpp.3.fc7 How reproducible: always Steps to Reproduce: 1. install jython 2. import dbexts 3. Actual results: fails with import error Expected results: should load Additional info:
Can fully reproduce with jython-2.2-0.4.Release_2_2beta1.1jpp.3.fc9.x86_64 on Fedora Rawhide.
[matej@hubmaier ~]$ rpm -q jython jython-2.2-0.4.Release_2_2beta1.1jpp.3.fc9.x86_64 [matej@hubmaier ~]$ rm -rf .jython-cache/ [matej@hubmaier ~]$ jython *sys-package-mgr*: processing new jar, '/usr/share/java/jython-2.2.jar' *sys-package-mgr*: processing new jar, '/usr/share/java/jakarta-oro-2.0.8.jar' *sys-package-mgr*: processing new jar, '/usr/share/java/tomcat5-servlet-2.4-api-5.5.26.jar' *sys-package-mgr*: processing new jar, '/usr/share/java/mysql-connector-java-3.1.12.jar' *sys-package-mgr*: processing new jar, '/usr/lib64/libreadline-java/libreadline-java-0.8.0.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/resources.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/rt.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/jsse.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/jce.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/charsets.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/ext/gnome-java-bridge.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/ext/localedata.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/ext/sunjce_provider.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/ext/sunpkcs11.jar' *sys-package-mgr*: processing new jar, '/usr/lib/jvm/java-1.7.0-icedtea-1.7.0.0.x86_64/jre/lib/ext/dnsns.jar' Jython 2.2b1 on java1.7.0 (JIT: null) >>> import re Traceback (innermost last): File "<console>", line 1, in ? File "/usr/share/jython/Lib/re.py", line 7, in ? ImportError: no module named sre >>>
Frank, can you help here? I'd really appreciate it. Thanks.
Well I guess Frank's not going to be able to help much :( http://fwierzbicki.blogspot.com/
Andrew: Just because I'm no longer at Red Hat, doesn't mean that I don't care :). Though I'll have to get an instance of Fedora up somewhere. My new email is frank.wierzbicki. I may be a little slow looking into it -- PyCon is just a week and a half away and I'm still implementing some of the stuff that I'm going to talk about...
Frank: I assumed that your email wouldn't work anymore - glad to see that you're still getting it! Thanks for taking a look. No pressure on the timeline.
BTW, just to add that the problem is not only with import re, but also import os.path import xmlrpclib also import os os.system("system") doesn't do anything, because there is no os.system.
Created attachment 298542 [details] spec file for jython 2.1.1
I think I have an updated .spec that fixes this problem What I believe to be the 2 problems are: 1) While building -Dpython.lib is set to "./Lib". I think it should be set to "CPythonLib" 2) I believe the below command is causing statements like "import os" to fail. "rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/Lib/UserDict.py" I removed this and importing modules looks much better. Also ran the regression tests, there were a few failures, yet the results looked the same from the new packaged RPM as from a pure jython developer-build. Prior to this, regression tests would fail right away, since importing "os" wasn't functioning. I'm still learning the ropes to packaging jython, so I might be misunderstanding the issue?? I'll attach the .spec I'm working with to this. (Note it's for Jython 2.1.1)
Created attachment 298545 [details] Jython 2.1.1 SRPM
Typo for above comments, it's version 2.2.1
Wasn't able to do any extensive testing, but all above tests succeed with jython built from the attached SRPM built on Fedora 8.
Of course, big thanks!!!
Just to prove that this is buildable http://koji.fedoraproject.org/koji/taskinfo?taskID=523437
Sorry for any perceived delay here. I'm at EclipseCon this week and haven't had much time to do anything outside of conference stuff. I'll deal with this when I get home. Thanks.
I forgot to update this bug. John's going to take care of this but was away from his computer for a day or two due to moving.
Change is in CVS "devel" branch. It's been built by koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=44955
This is confirmed fixed. Closing.
*** Bug 455384 has been marked as a duplicate of this bug. ***
Are we going to / did we already backport this fix to Fedora 8, John?
This fix hasn't been backported to F8 yet. I will work up an updated F8 package with this fix. I will get to it by end of the week.
This fix has been applied to the fedora 8 jython package, koji build link can be found here: http://koji.fedoraproject.org/koji/buildinfo?buildID=57604