|
From: <Mat...@i2...> - 2001-12-19 17:24:07
|
Hi,
I had a problem with multi level import from a jar file in my sys.path.
basically, my simple test jar looks as follows, with the init files being
empty, and the py files having a simple variable def:
jlib.jar:
Lib/
Lib/aaa/
Lib/aaa/__init__.py
Lib/aaa/bbb/
Lib/aaa/bbb/__init__.py
Lib/aaa/bbb/ccc/
Lib/aaa/bbb/ccc/__init__.py
Lib/aaa/bbb/ccc/yyy.py
Lib/aaa/bbb/xxx.py
import aaa works fine
import aaa.bbb (or more levels) doesn't
I traced the problem down to the following line from the method
"loadFromZipFile" on line 302 in org/python/core/imp.java
SyspathArchive subArchive =
zipArchive.makeSubfolder(modName);
Which should probably be
SyspathArchive subArchive =
zipArchive.makeSubfolder(name);
Or at least, when I change it to that, all levels of import work for me =)
If I have to do more complicated changes, whats the best way for me to
generate a patch? I'm somewhat of a CVS/patch/diff newbie, so excuse me
if this is a simple question. Do I need to have 2 CVS directories, one
untouched to generate the diff against? Can someone give me a simple
usage scenario as an example of generating a patch? Thanks,
Matt
|