This commit is contained in:
Martin v. Löwis 2014-03-30 21:15:26 +02:00
commit 669b095031
4 changed files with 16 additions and 4 deletions

View File

@ -364,12 +364,17 @@ def setcopyright():
builtins.credits = _sitebuiltins._Printer("credits", """\ builtins.credits = _sitebuiltins._Printer("credits", """\
Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
for supporting Python development. See www.python.org for more information.""") for supporting Python development. See www.python.org for more information.""")
here = os.path.dirname(os.__file__) files, dirs = [], []
# Not all modules are required to have a __file__ attribute. See
# PEP 420 for more details.
if hasattr(os, '__file__'):
here = os.path.dirname(os.__file__)
files.extend(["LICENSE.txt", "LICENSE"])
dirs.extend([os.path.join(here, os.pardir), here, os.curdir])
builtins.license = _sitebuiltins._Printer( builtins.license = _sitebuiltins._Printer(
"license", "license",
"See http://www.python.org/download/releases/%.5s/license" % sys.version, "See http://www.python.org/download/releases/%.5s/license" % sys.version,
["LICENSE.txt", "LICENSE"], files, dirs)
[os.path.join(here, os.pardir), here, os.curdir])
def sethelper(): def sethelper():

View File

@ -169,6 +169,9 @@ Tests
Tools/Demos Tools/Demos
----------- -----------
- Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
- Issue #11824: Consider ABI tags in freeze. Patch by Meador Inge. - Issue #11824: Consider ABI tags in freeze. Patch by Meador Inge.
- Issue #20535: PYTHONWARNING no longer affects the run_tests.py script. - Issue #20535: PYTHONWARNING no longer affects the run_tests.py script.

View File

@ -365,6 +365,10 @@ def main():
else: else:
mf.load_file(mod) mf.load_file(mod)
# Alias "importlib._bootstrap" to "_frozen_importlib" so that the
# import machinery can bootstrap.
mf.modules["_frozen_importlib"] = mf.modules["importlib._bootstrap"]
# Add the main script as either __main__, or the actual module name. # Add the main script as either __main__, or the actual module name.
if python_entry_is_main: if python_entry_is_main:
mf.run_script(scriptfile) mf.run_script(scriptfile)

View File

@ -3,7 +3,7 @@ import sys
# Write the config.c file # Write the config.c file
never = ['marshal', 'imp', '_ast', '__main__', 'builtins', never = ['marshal', '_imp', '_ast', '__main__', 'builtins',
'sys', 'gc', '_warnings'] 'sys', 'gc', '_warnings']
def makeconfig(infp, outfp, modules, with_ifdef=0): def makeconfig(infp, outfp, modules, with_ifdef=0):