[Python-checkins] python/nondist/sandbox/setuptools pkg_resources.py, 1.30, 1.31
pje@users.sourceforge.net
pje at users.sourceforge.net
Tue Jun 14 03:28:47 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5704
Modified Files:
pkg_resources.py
Log Message:
Fix missing '__file__' when running scripts.
Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- pkg_resources.py 14 Jun 2005 01:25:48 -0000 1.30
+++ pkg_resources.py 14 Jun 2005 01:28:44 -0000 1.31
@@ -587,7 +587,7 @@
script_text = self.get_metadata(script).replace('\r\n','\n')
script_text = script_text.replace('\r','\n')
script_filename = self._fn(self.egg_info,script)
-
+ namespace['__file__'] = script_filename
if os.path.exists(script_filename):
execfile(script_filename, namespace, namespace)
else:
More information about the Python-checkins
mailing list