Author: Amaury Forgeot d'Arc <[email protected]>
Branch:
Changeset: r49457:dff1cac01f75
Date: 2011-11-16 01:01 +0100
http://bitbucket.org/pypy/pypy/changeset/dff1cac01f75/
Log: Allows presetup.py to execute setup.py scripts which use the "if
__name__ == '__main__'" idiom
diff --git a/pypy/module/cpyext/presetup.py b/pypy/module/cpyext/presetup.py
--- a/pypy/module/cpyext/presetup.py
+++ b/pypy/module/cpyext/presetup.py
@@ -42,4 +42,4 @@
patch_distutils()
del sys.argv[0]
-execfile(sys.argv[0], {'__file__': sys.argv[0]})
+execfile(sys.argv[0], {'__file__': sys.argv[0], '__name__': '__main__'})
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit