-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[FR] When sorting sources, move Message Compiler (.mc
) files first
#4986
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
Comments
I know this would have to be done in https://github.com/pypa/distutils Do you think setuptools/setuptools/_distutils/command/build_ext.py Lines 529 to 530 in f37845b
Or should that happen in setuptools/setuptools/_distutils/compilers/C/msvc.py Lines 385 to 387 in f37845b
Or even setuptools/setuptools/_distutils/compilers/C/base.py Lines 387 to 388 in f37845b
(It doesn't feel like |
Thanks @Avasam, I am not very familiar with (a) Is it always the case that If (a), then I wouldn't see a problem in possibly modifying That said, it is up to the Footnotes
|
I think either solution would work for pywin32. But my preference of course lies in the build backend being "smarter" and working out of the box in more scenarios where its concerned. My current understanding and experience (which is limited to "pywin32 uses it") is that Message Compiler ( You'll find that for every .mc file in pywin32, there's no .h file checked-in, because they're generated on build. Windows' official doc on the Message Compiler: https://learn.microsoft.com/en-us/windows/win32/wes/message-compiler--mc-exe- |
Uh oh!
There was an error while loading. Please reload this page.
What's the problem this feature will solve?
This is re-opening python/cpython#86175 for setuptools.
If I'm not mistaken, python/cpython#12341 is responsible for sorting sources in distutils to enable reproducible builds.
But since then, pywin32 has had to manually re-sort the sources by doing this:
If pywin32 didn't have to do this "compiler patching", I'm pretty sure I could remove this hack and 2 deprecated distutils imports
Describe the solution you'd like
I'd like setuptools (distutils) to sort sources in such a way that Message Compiler (
.mc
) files come first.If there's an already existing better way to handle
.mc
files. Please let me know!Alternative Solutions
(see the current workaround posted above)
Additional context
.mc
files: https://setuptools.pypa.io/en/latest/deprecated/distutils/setupscript.html#extension-source-filesCode of Conduct
The text was updated successfully, but these errors were encountered: