From: Thomas H. <th...@us...> - 2005-04-08 17:41:50
|
Update of /cvsroot/py2exe/py2exe/hacks/memimp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20222 Modified Files: zipextimporter.py Log Message: Handle extensions in packages. Index: zipextimporter.py =================================================================== RCS file: /cvsroot/py2exe/py2exe/hacks/memimp/zipextimporter.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zipextimporter.py 16 Dec 2004 09:29:42 -0000 1.2 --- zipextimporter.py 8 Apr 2005 17:41:40 -0000 1.3 *************** *** 51,54 **** --- 51,55 ---- return result + fullname = fullname.replace(".", "\\") for s in self._suffixes: if (fullname + s) in self._files: *************** *** 61,64 **** --- 62,67 ---- except zipimport.ZipImportError: pass + initname = fullname.split(".")[-1] + fullname = fullname.replace(".", "\\") for s in self._suffixes: path = fullname + s *************** *** 67,71 **** # XXX maybe in C code... code = self.get_data(path) ! mod = _memimporter.import_module(code, "init" + fullname) mod.__file__ = "%s\\%s" % (self.archive, path) mod.__loader__ = self --- 70,74 ---- # XXX maybe in C code... code = self.get_data(path) ! mod = _memimporter.import_module(code, "init" + initname) mod.__file__ = "%s\\%s" % (self.archive, path) mod.__loader__ = self |