Conversation
This was referenced Mar 28, 2026
24bda6e to
1808e12
Compare
Co-Authored-By: Raed Rizqie <raed.rizqie@gmail.com>
1808e12 to
3d2bd90
Compare
Avasam
commented
May 3, 2026
Comment on lines
+70
to
+83
| self.cc, self.cxx, self.rc, self.mc = get_config_vars( | ||
| 'CC', 'CXX', 'WINDRES', 'WINDMC' | ||
| ) | ||
|
|
||
| # Override 'CC' and 'CXX' environment variables for | ||
| # Override environment variables for | ||
| # building using MINGW compiler for MSVC python. | ||
| self.cc = os.environ.get('CC', self.cc or 'gcc') | ||
| self.cxx = os.environ.get('CXX', self.cxx or 'g++') | ||
| self.rc = os.environ.get( # resource compiler | ||
| "WINDRES", cast('str', self.rc) or "windres" | ||
| ) | ||
| self.mc = os.environ.get( # message compiler | ||
| "WINDMC", cast('str', self.mc) or "windmc" | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
Not sure if I'm overcomplicating and should just do:
Suggested change
| self.cc, self.cxx, self.rc, self.mc = get_config_vars( | |
| 'CC', 'CXX', 'WINDRES', 'WINDMC' | |
| ) | |
| # Override 'CC' and 'CXX' environment variables for | |
| # Override environment variables for | |
| # building using MINGW compiler for MSVC python. | |
| self.cc = os.environ.get('CC', self.cc or 'gcc') | |
| self.cxx = os.environ.get('CXX', self.cxx or 'g++') | |
| self.rc = os.environ.get( # resource compiler | |
| "WINDRES", cast('str', self.rc) or "windres" | |
| ) | |
| self.mc = os.environ.get( # message compiler | |
| "WINDMC", cast('str', self.mc) or "windmc" | |
| ) | |
| self.cc, self.cxx = get_config_vars('CC', 'CXX') | |
| # Override 'CC' and 'CXX' environment variables for | |
| # building using MINGW compiler for MSVC python. | |
| self.cc = os.environ.get('CC', self.cc or 'gcc') | |
| self.cxx = os.environ.get('CXX', self.cxx or 'g++') | |
| self.rc = os.environ.get("WINDRES", "windres") # resource compiler | |
| self.mc = os.environ.get("WINDMC", "windmc") # message compiler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of pypa/setuptools#4742 from @raedrizqie with added type hints and deduplicated try-catch
I noticed this compiler was missing support whilst trying to add first-party MinGW support to pywin32.
Tested at: