-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-45188: Windows now regenerates frozen modules at the start of build instead of late #28322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ld instead of late
I haven't looked at how much slower this makes the build, but it ought to be a minute or so. It'd be possible to make the freeze_module project share a temp directory with pythoncore, which would speed it up, but that's going to hurt reliability so I'd rather not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for doing this!
I think you can also drop the special-case in |
Potentially, but I'll leave that one to you ;) In case it breaks other things |
Tools/scripts/freeze_modules.py
Outdated
@@ -523,7 +523,7 @@ def regen_pcbuild(modules): | |||
continue | |||
pyfile = os.path.relpath(src.pyfile, ROOT_DIR).replace('/', '\\') | |||
header = os.path.relpath(src.frozenfile, ROOT_DIR).replace('/', '\\') | |||
intfile = header.split('\\')[-1].strip('.h') + '.g.h' | |||
intfile = os.path.splitext(os.path.basename(header))[0] + '.g.h' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @ericsnowcurrently I fixed a bug in your script here (should've been removesuffix('.h')
rather than strip, but better to stick with os.path
when dealing with paths anyway).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this. I was going to suggest using ntpath
explicitly here, but in this case it really should be os.path
. 🙂
Thanks again for doing this, @zooba! |
https://bugs.python.org/issue45188