mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
bpo-45020: Drop the frozen .h files from the repo. (gh-28392)
The main advantage is that the files will no longer show up in diffs and PRs. That means, for a PR, the number of files / lines changed will more clearly reflect the actual change. (This is essentially an un-revert of gh-28375.) https://bugs.python.org/issue45020
This commit is contained in:
parent
a59ede2447
commit
fdc6b3d931
17 changed files with 85 additions and 14455 deletions
|
@ -20,8 +20,9 @@ TOOLS_DIR = os.path.dirname(SCRIPTS_DIR)
|
|||
ROOT_DIR = os.path.dirname(TOOLS_DIR)
|
||||
|
||||
STDLIB_DIR = os.path.join(ROOT_DIR, 'Lib')
|
||||
# If MODULES_DIR is changed then the .gitattributes file needs to be updated.
|
||||
MODULES_DIR = os.path.join(ROOT_DIR, 'Python/frozen_modules')
|
||||
# If MODULES_DIR is changed then the .gitattributes and .gitignore files
|
||||
# need to be updated.
|
||||
MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'frozen_modules')
|
||||
|
||||
if sys.platform != "win32":
|
||||
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
|
||||
|
@ -539,7 +540,7 @@ def regen_makefile(modules):
|
|||
rules = ['']
|
||||
for src in _iter_sources(modules):
|
||||
header = relpath_for_posix_display(src.frozenfile, ROOT_DIR)
|
||||
frozenfiles.append(f'\t\t$(srcdir)/{header} \\')
|
||||
frozenfiles.append(f'\t\t{header} \\')
|
||||
|
||||
pyfile = relpath_for_posix_display(src.pyfile, ROOT_DIR)
|
||||
# Note that we freeze the module to the target .h file
|
||||
|
@ -576,10 +577,6 @@ def regen_pcbuild(modules):
|
|||
projlines = []
|
||||
filterlines = []
|
||||
for src in _iter_sources(modules):
|
||||
# For now we only require the essential frozen modules on Windows.
|
||||
# See bpo-45186 and bpo-45188.
|
||||
if src.id not in ESSENTIAL and src.id != '__hello__':
|
||||
continue
|
||||
pyfile = relpath_for_windows_display(src.pyfile, ROOT_DIR)
|
||||
header = relpath_for_windows_display(src.frozenfile, ROOT_DIR)
|
||||
intfile = ntpath.splitext(ntpath.basename(header))[0] + '.g.h'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue