mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
This commit is contained in:
parent
3a4340325b
commit
c00d39e96a
4 changed files with 16 additions and 4 deletions
11
Lib/site.py
11
Lib/site.py
|
@ -364,12 +364,17 @@ def setcopyright():
|
|||
builtins.credits = _sitebuiltins._Printer("credits", """\
|
||||
Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
|
||||
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(
|
||||
"license",
|
||||
"See http://www.python.org/download/releases/%.5s/license" % sys.version,
|
||||
["LICENSE.txt", "LICENSE"],
|
||||
[os.path.join(here, os.pardir), here, os.curdir])
|
||||
files, dirs)
|
||||
|
||||
|
||||
def sethelper():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue