| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| import contextlib | ||
| import distutils.ccompiler | ||
| import logging | ||
| import os | ||
| import os.path | ||
| import re | ||
| import sys | ||
|
|
||
| from c_common.fsutil import match_glob as _match_glob | ||
| from c_common.tables import parse_table as _parse_table | ||
| Expand Down Expand Up | @@ -168,9 +170,17 @@ def handling_errors(ignore_exc=None, *, log_err=None): | |
| } | ||
|
|
||
|
|
||
| def _get_default_compiler(): | ||
| if re.match('cygwin.*', sys.platform) is not None: | ||
|
Comment thread
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou can just remove cygwin as it is unsupported.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityAre you sure?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWe have a bunch of Cygwin-related codes (__CYGWIN__) in CPython code base, Did we decide to remove them?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityCygwin is certainly still alive to some extent, so I'd say let's not worry about that in the PR.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIf you remove cygwin branch, it will fallback to unix which is better than special casing it but it's minor and you can ignore this too.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
It's care about Windows/Cygwin case, see: https://docs.python.org/3/library/sys.html.
Sorry, something went wrong.
All reactions
|
||
| return 'unix' | ||
| if os.name == 'nt': | ||
| return 'msvc' | ||
| return 'unix' | ||
|
|
||
|
|
||
| def _get_preprocessor(tool): | ||
| if tool is True: | ||
| tool = distutils.ccompiler.get_default_compiler() | ||
| tool = _get_default_compiler() | ||
| preprocess = _COMPILERS.get(tool) | ||
| if preprocess is None: | ||
| raise ValueError(f'unsupported tool {tool}') | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityMinimalized ported version from
cpython/Lib/distutils/ccompiler.py
Lines 937 to 956 in f4c0348
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt may be worth having a short comment indicating this was derived from the distutils code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.