Skip to content

Commit a9757bf

Browse files
bpo-45020: Drop the frozen .h files from the repo. (gh-28375)
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. https://bugs.python.org/issue45020
1 parent a75a257 commit a9757bf

16 files changed

+71
-14437
lines changed

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ Tools/msi/obj
121121
Tools/ssl/amd64
122122
Tools/ssl/win32
123123

124-
# TODO: Once we auto-regen frozem modules for Windows builds
125-
# we can drop the .h files from the repo and ignore them here.
126-
# At that point we will rely the frozen manifest file to identify
127-
# changed generated files. We'll drop the entry for it then.
128-
# See: Tools/scripts/freeze_modules.py.
129-
#Python/frozen_modules/*.h
124+
# The frozen modules are always generated at build time.
125+
Python/frozen_modules/*.h
126+
# The manifest can be generated at any time with "make regen-frozen".
127+
Python/frozen_modules/MANIFEST
130128

131129
# Two-trick pony for OSX and other case insensitive file systems:
132130
# Ignore ./python binary on Unix but still look into ./Python/ directory.

PCbuild/_freeze_module.vcxproj

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,46 @@
245245
<IntFile>$(IntDir)zipimport.g.h</IntFile>
246246
<OutFile>$(PySourcePath)Python\frozen_modules\zipimport.h</OutFile>
247247
</None>
248+
<None Include="..\Lib\abc.py">
249+
<ModName>abc</ModName>
250+
<IntFile>$(IntDir)abc.g.h</IntFile>
251+
<OutFile>$(PySourcePath)Python\frozen_modules\abc.h</OutFile>
252+
</None>
253+
<None Include="..\Lib\io.py">
254+
<ModName>io</ModName>
255+
<IntFile>$(IntDir)io.g.h</IntFile>
256+
<OutFile>$(PySourcePath)Python\frozen_modules\io.h</OutFile>
257+
</None>
258+
<None Include="..\Lib\_collections_abc.py">
259+
<ModName>_collections_abc</ModName>
260+
<IntFile>$(IntDir)_collections_abc.g.h</IntFile>
261+
<OutFile>$(PySourcePath)Python\frozen_modules\_collections_abc.h</OutFile>
262+
</None>
263+
<None Include="..\Lib\_sitebuiltins.py">
264+
<ModName>_sitebuiltins</ModName>
265+
<IntFile>$(IntDir)_sitebuiltins.g.h</IntFile>
266+
<OutFile>$(PySourcePath)Python\frozen_modules\_sitebuiltins.h</OutFile>
267+
</None>
268+
<None Include="..\Lib\genericpath.py">
269+
<ModName>genericpath</ModName>
270+
<IntFile>$(IntDir)genericpath.g.h</IntFile>
271+
<OutFile>$(PySourcePath)Python\frozen_modules\genericpath.h</OutFile>
272+
</None>
273+
<None Include="..\Lib\ntpath.py">
274+
<ModName>ntpath</ModName>
275+
<IntFile>$(IntDir)ntpath.g.h</IntFile>
276+
<OutFile>$(PySourcePath)Python\frozen_modules\ntpath.h</OutFile>
277+
</None>
278+
<None Include="..\Lib\posixpath.py">
279+
<ModName>posixpath</ModName>
280+
<IntFile>$(IntDir)posixpath.g.h</IntFile>
281+
<OutFile>$(PySourcePath)Python\frozen_modules\posixpath.h</OutFile>
282+
</None>
283+
<None Include="..\Lib\stat.py">
284+
<ModName>stat</ModName>
285+
<IntFile>$(IntDir)stat.g.h</IntFile>
286+
<OutFile>$(PySourcePath)Python\frozen_modules\stat.h</OutFile>
287+
</None>
248288
<None Include="..\Lib\__hello__.py">
249289
<ModName>__hello__</ModName>
250290
<IntFile>$(IntDir)__hello__.g.h</IntFile>

PCbuild/_freeze_module.vcxproj.filters

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,30 @@
2525
<None Include="..\Lib\zipimport.py">
2626
<Filter>Python Files</Filter>
2727
</None>
28+
<None Include="..\Lib\abc.py">
29+
<Filter>Python Files</Filter>
30+
</None>
31+
<None Include="..\Lib\io.py">
32+
<Filter>Python Files</Filter>
33+
</None>
34+
<None Include="..\Lib\_collections_abc.py">
35+
<Filter>Python Files</Filter>
36+
</None>
37+
<None Include="..\Lib\_sitebuiltins.py">
38+
<Filter>Python Files</Filter>
39+
</None>
40+
<None Include="..\Lib\genericpath.py">
41+
<Filter>Python Files</Filter>
42+
</None>
43+
<None Include="..\Lib\ntpath.py">
44+
<Filter>Python Files</Filter>
45+
</None>
46+
<None Include="..\Lib\posixpath.py">
47+
<Filter>Python Files</Filter>
48+
</None>
49+
<None Include="..\Lib\stat.py">
50+
<Filter>Python Files</Filter>
51+
</None>
2852
<None Include="..\Lib\__hello__.py">
2953
<Filter>Python Files</Filter>
3054
</None>

Python/frozen_modules/MANIFEST

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)