-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Merge with distutils@d7ffdb9c7 #4538
Closed
Closed
Conversation
This file contains 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
Upstreamed fix from nix, see patch here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/setuptools/setuptools-distutils-C%2B%2B.patch
…ject and adjust expectations in tests.
Remove extra quotes from litteral strings
This reverts commit d3e5de0.
Starting with b42197c UnixCCompiler got some improved support for cygwin which made the doctest fail. The doctest is hard to read as is, and adding more platform specific exceptions wouldn't help, so just convert to a normal test and special case cygwin to make the test pass there again.
Mingw32CCompiler() checks that the default compiler isn't cygwin, so it can't be used under cygwin, so skip it there.
Fix cygwin CI job
Fix PERF401 errors.
Prior to 3.11, singledispatch[method] doesn't know about unions.
…rive-relative absolute on Windows.
Test for convert_path no longer runs on all operating systems as it's too difficult (impossible) to monkeypatch PurePath reliably.
…n a platform-sensitive way. Should fix failures on mingw.
…files Allow path objects for data-files
ENH: Extension should be able to accept PathLike sources objects
Otherwise the test fails if arguments are passed to pytest, for example --no-cov: FAILED distutils/tests/test_dist.py::TestDistributionBehavior::test_venv_install_options - distutils.errors.DistutilsArgError: option --no-cov not recognized
…fault compiler The tests currently assume everywhere that there is only one compiler per platform, and while it would be possible to parametrize all the tests it would make things more complex and we'd also have to decide which compiler is required for running the tests and which one is optional etc. To avoid all this introduce a DISTUTILS_TEST_DEFAULT_COMPILER env var which can be used to override the default compiler type for the whole test run. This keeps the tests as is and makes sure all tests run against the alternative compiler. Also add it to pass_env for tox, so it gets passed to pytest, if set. The added CI job installs an ucrt targeting GCC via MSYS2, and forces the MSVC CPython to use it via DISTUTILS_TEST_DEFAULT_COMPILER=mingw32.
This was added back in the day to make mingw use the same CRT as CPython (https://bugs.python.org/issue870382), but at least with newer mingw-w64 and ucrt switching the CRT at "runtime" isn't supported anymore. To build a compatible extension you have to use a ucrt mingw-w64 build, so things match up and link against the same CRT. CPython 3.5+ uses ucrt (see https://wiki.python.org/moin/WindowsCompilers), so anything besides that is no longer relevant, which only leaves vcruntime140. Since it's not clear what linking against vcruntime140 solves, and there have been reports of it needing to be patched out: * #4101 * pypa/distutils#204 (comment) let's just make it return nothing. Keep get_msvcr() around for now to avoid breaking code which patched it. Fixes #204
Its last use in cygwinccompiler was just removed.
…_add_flags logic. Reduces cyclomatic complexity so it passes QA checks.
Distutils C++ support
…nv_install_options venv_install_options: add missing clear_argv fixture
…on-mingw-variant2 mingw: make get_msvcr() a noop + add a CI job testing MSVC Python with GCC
After pypa/distutils#275, I'm going to open a new PR. |
This was referenced Sep 1, 2024
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.
.as_posix()
on it.Summary of changes
Closes
Pull Request Checklist
newsfragments/
.(See documentation for details)