Bug 426373 - many missinig modules
many missinig modules
Product: Fedora
Classification: Fedora
Component: jython (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: John Matthews
Fedora Extras Quality Assurance
: 455384 (view as bug list)
Depends On:
Blocks: F9Blocker
  Show dependency treegraph
Reported: 2007-12-20 10:59 EST by Brian G. Anderson
Modified: 2008-07-26 11:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-08 22:50:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
spec file for jython 2.1.1 (12.49 KB, text/x-rpm-spec)
2008-03-19 13:21 EDT, John Matthews
no flags Details
Jython 2.1.1 SRPM (2.44 MB, application/x-rpm)
2008-03-19 13:25 EDT, John Matthews
no flags Details

  None (edit)
Description Brian G. Anderson 2007-12-20 10:59:47 EST
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):

How reproducible:

Steps to Reproduce:
1. install jython
2. import dbexts
Actual results:
fails with import error

Expected results:
should load

Additional info:
Comment 1 Matěj Cepl 2008-03-04 06:05:26 EST
Can fully reproduce with jython-2.2-0.4.Release_2_2beta1.1jpp.3.fc9.x86_64 on
Fedora Rawhide.
Comment 2 Matěj Cepl 2008-03-04 06:07:39 EST
[matej@hubmaier ~]$ rpm -q jython
[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,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new jar,
*sys-package-mgr*: processing new 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

Comment 3 Andrew Overholt 2008-03-04 08:49:08 EST
Frank, can you help here?  I'd really appreciate it.  Thanks.
Comment 4 Andrew Overholt 2008-03-04 11:17:56 EST
Well I guess Frank's not going to be able to help much :(

Comment 5 Frank Wierzbicki 2008-03-04 16:45:57 EST
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@sun.com.  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...
Comment 6 Andrew Overholt 2008-03-04 16:50:24 EST
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.
Comment 7 Matěj Cepl 2008-03-18 05:16:50 EDT
BTW, just to add that the problem is not only with import re, but also

import os.path
import xmlrpclib


import os

doesn't do anything, because there is no os.system.
Comment 8 John Matthews 2008-03-19 13:21:00 EDT
Created attachment 298542 [details]
spec file for jython 2.1.1
Comment 9 John Matthews 2008-03-19 13:23:43 EDT
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

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)

Comment 10 John Matthews 2008-03-19 13:25:36 EDT
Created attachment 298545 [details]
Jython 2.1.1 SRPM
Comment 11 John Matthews 2008-03-19 14:28:17 EDT
Typo for above comments,  it's version 2.2.1

Comment 12 Matěj Cepl 2008-03-19 15:47:13 EDT
Wasn't able to do any extensive testing, but all above tests succeed with jython
built from the attached SRPM built on Fedora 8.
Comment 13 Matěj Cepl 2008-03-19 15:47:28 EDT
Of course, big thanks!!!
Comment 14 Matěj Cepl 2008-03-20 04:14:55 EDT
Just to prove that this is buildable
Comment 15 Andrew Overholt 2008-03-20 13:34:34 EDT
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.
Comment 16 Andrew Overholt 2008-03-27 15:39:38 EDT
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.
Comment 17 John Matthews 2008-04-04 14:10:09 EDT
Change is in CVS "devel" branch.
It's been built by koji:

Comment 18 Jesse Keating 2008-04-08 22:50:28 EDT
This is confirmed fixed.  Closing.
Comment 19 John Matthews 2008-07-15 09:53:43 EDT
*** Bug 455384 has been marked as a duplicate of this bug. ***
Comment 20 Andrew Overholt 2008-07-15 11:19:08 EDT
Are we going to / did we already backport this fix to Fedora 8, John?
Comment 21 John Matthews 2008-07-15 11:25:15 EDT
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.

Comment 22 John Matthews 2008-07-26 11:18:01 EDT
This fix has been applied to the fedora 8 jython package, 

koji build link can be found here:

Note You need to log in before you can comment on or make changes to this bug.