Fred L. Drake, Jr. <[EMAIL PROTECTED]> added the comment: I don't think these are the right thing to do.
1. Your run_setup() changes add a os.chdir(), but then uses the path to the script as passed in; this assumes that the provided path is absolute, which is not a good assumption. That is not currently required. The effect is that a path that works currently may not work after the change. A relative path will not be usable to locate support files in this case, since it no longer refers to the directory is used to. Also, the way you restore the current directory doesn't work; os.curdir isn't what you think it is. This isn't covered in the test, either. 2. Apparently there are setup.py scripts that test __name__ (this surprised me, but Google Code Search says there are many: http://www.google.com/codesearch?q=file%3Asetup.py+%22__main__%22). This change would affect those that are currently seeing "__builtin__" (picked up from the built-in namespace). Arguably, it's reasonable to expect run_setup() to restore the current directory if a setup.py script does change it, but it's not clear that the change in behavior wouldn't cause problems for existing scripts. I've adjusted the patch so that the __file__ is supported, but the other behaviors are omitted. This has been commited in revision 62142 on the trunk. ---------- assignee: -> fdrake nosy: +fdrake priority: -> low __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2385> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com