Since the current hook-xml.py file is broken, I quickly threw together
a proper implementation. This version attempts to do away with the
process spawning nonsense which in turn spawned a platform specific
bug, which in turn is still broken for Linux (throws exceptions for
me). This version is faster and platform agnostic while being easier
to read and therefore maintain. Please add to SVN. It works for me
but I only tested it on Linux. I see no reason it will fail on MSWin
based platforms.
If you prefer, I can email you the file directly so you can avoid
formatting issues.
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2001, 2002 McMillan
Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA
# Contributed by Greg Copeland
hiddenimports = ['xml.sax.xmlreader','xml.sax.expatreader']
def hook(mod):
# This hook checks for the infamous _xmlcore hack
# http://www.amk.ca/diary/2003/03/pythons__xmlplus_hack.html
#
# Re-wrote this because this was a REALLY crappy and inefficient
way to check for this
# stuff. Not to mention, it used the obsolete mktemp interface
which should always
# be avoided for security reasons. This implementation should be
equivalent without
# caring for platform details as python already addresses it. -gc
import xml as xxxxxml
fl = xxxxxml.__file__
if fl.find( '_xmlplus' ) > -1:
if fl[:-3] == ".py":
fl = txt + 'c'
del xxxxxml
import marshal
co = marshal.loads(open(fl, 'rb').read()[8:])
mod.__init__('xml', fl, co)
return mod
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---