Update of /cvsroot/jython/jython/Tools/jythonc
In directory slayer.i.sourceforge.net:/tmp/cvs-serv28475
Modified Files:
compile.py SimpleCompiler.py
Log Message:
A small hack to fix bug 123627. This does not solve the dynamic
issues with finding modules in __path__, but it works in the
situations where the dotted package names matches the directory
structure.
Index: compile.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/compile.py,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -r2.14 -r2.15
*** compile.py 2000/11/19 22:32:45 2.14
--- compile.py 2000/11/30 08:54:55 2.15
***************
*** 229,233 ****
code = jast.Block(pi.execstring(data))
mod.addMain(code, pi)
-
self.addDependencies(mod)
return mod
--- 229,232 ----
***************
*** 277,283 ****
PyObject.attributes = {}
#print ' attrs', attrs.keys()
! for name, value in mod.imports.items():
#print ' depends', name
! m = ImportName.lookupName(name)
self.addDependency(m, attrs, mod, value)
--- 276,288 ----
PyObject.attributes = {}
#print ' attrs', attrs.keys()
!
! for name, (value, module) in mod.imports.items():
#print ' depends', name
! if module.package:
! m = ImportName.lookupName(module.package + '.' + name)
! if m is None:
! m = ImportName.lookupName(name)
! else:
! m = ImportName.lookupName(name)
self.addDependency(m, attrs, mod, value)
Index: SimpleCompiler.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/SimpleCompiler.py,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -r2.9 -r2.10
*** SimpleCompiler.py 2000/11/10 15:06:56 2.9
--- SimpleCompiler.py 2000/11/30 08:54:55 2.10
***************
*** 704,711 ****
def addModule(self, mod, value=1):
! #print 'add module', mod.name, mod
if self.module.imports.has_key(mod) and value == 1:
return
! self.module.imports[mod] = value
def addSetAttribute(self, obj, name, value):
--- 704,711 ----
def addModule(self, mod, value=1):
! #print 'add module', mod
if self.module.imports.has_key(mod) and value == 1:
return
! self.module.imports[mod] = (value, self.module)
def addSetAttribute(self, obj, name, value):
|