Update of /cvsroot/boost/boost/tools/buildbot/src/boost
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5471/boost
Modified Files:
patchwork.py
Log Message:
Fix open() to correctly call the forwarding _open_ function.
Index: patchwork.py
===================================================================
RCS file: /cvsroot/boost/boost/tools/buildbot/src/boost/patchwork.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- patchwork.py 7 May 2007 23:42:20 -0000 1.2
+++ patchwork.py 10 May 2007 01:40:21 -0000 1.3
@@ -139,11 +139,13 @@
else:
#~ print "\tZIP FILE: %s" % (self.path);
source +=
self.importer.get_data(self.path).replace("\r\n","\n").replace("\r","\n")
- source += "\n\n"
- #~ source += "print '[%s].[open] == %s ... %s' % (__name__,open,
isinstance(open,type) )\n"
- #~ source += "print '[%s].[file] == %s ... %s' % (__name__,file,
isinstance(file,type) )\n"
- source += "if isinstance(open,type):\n\tfrom boost.patchwork import
_open_ as open\n"
- source += "if isinstance(file,type):\n\tfrom boost.patchwork import
_file_ as file\n"
+ source += '''
+import __builtin__
+if __builtin__.open == open:
+ from boost.patchwork import _open_ as open
+if isinstance(file,type):
+ from boost.patchwork import _file_ as file
+'''
code = compiler.compile(source,self.path,'exec')
mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
mod.__file__ = os.path.join(self.importer.archive,self.path)
@@ -171,7 +173,7 @@
raise ImportError
def find_module(self,fullname,path=None):
- print "--- patchwork_importer.find_module(self,\n\t%s,\n\t%s)" %
(fullname,path)
+ #~ print "--- patchwork_importer.find_module(self,\n\t%s,\n\t%s)" %
(fullname,path)
loader = None
for package in _g_.packages_to_search:
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs