Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c00d39e9
Commit
c00d39e9
authored
Mar 30, 2014
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
parent
3a434032
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
Lib/site.py
Lib/site.py
+8
-3
Misc/NEWS
Misc/NEWS
+3
-0
Tools/freeze/freeze.py
Tools/freeze/freeze.py
+4
-0
Tools/freeze/makeconfig.py
Tools/freeze/makeconfig.py
+1
-1
No files found.
Lib/site.py
View file @
c00d39e9
...
...
@@ -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
():
...
...
Misc/NEWS
View file @
c00d39e9
...
...
@@ -137,6 +137,9 @@ Tests
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 #20535: PYTHONWARNING no longer affects the run_tests.py script.
...
...
Tools/freeze/freeze.py
View file @
c00d39e9
...
...
@@ -365,6 +365,10 @@ def main():
else
:
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.
if
python_entry_is_main
:
mf
.
run_script
(
scriptfile
)
...
...
Tools/freeze/makeconfig.py
View file @
c00d39e9
...
...
@@ -3,7 +3,7 @@ import sys
# Write the config.c file
never
=
[
'marshal'
,
'imp'
,
'_ast'
,
'__main__'
,
'builtins'
,
never
=
[
'marshal'
,
'
_
imp'
,
'_ast'
,
'__main__'
,
'builtins'
,
'sys'
,
'gc'
,
'_warnings'
]
def
makeconfig
(
infp
,
outfp
,
modules
,
with_ifdef
=
0
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment