1. Pypy
  2. Untitled project
  3. pypy

Commits

Amaury Forgeot d'Arc  committed dff1cac

Allows presetup.py to execute setup.py scripts which use
the "if __name__ == '__main__'" idiom

  • Participants
  • Parent commits bd871af
  • Branches default

Comments (0)

Files changed (1)

File pypy/module/cpyext/presetup.py

View file
  • Ignore whitespace
 patch_distutils()
 
 del sys.argv[0]
-execfile(sys.argv[0], {'__file__': sys.argv[0]})
+execfile(sys.argv[0], {'__file__': sys.argv[0], '__name__': '__main__'})