Improve handling if runtime_library_dirs is set with cygwin/mingw#150
Merged
Improve handling if runtime_library_dirs is set with cygwin/mingw#150
Conversation
Closed
On Windows there is nothing like rpath, so when CygwinCCompiler() tries to link it will assume unix and pass rpath flags to the linker, which will fail. In cygwin this is currently patched away: https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/python39.git;a=blob;f=3.1-enable-new-dtags.patch;h=716af3b14d3483e5a4 It is taking some macos fallback branch that is equal to library_dirs, which doesn't add much if library_dirs is set, so in theory it should just return [] there. This patch tries to bring it a bit closer to MSVCCompiler() which warns if runtime_library_dirs is passed and raises if runtime_library_dir_option() is called. In the case of cygwin we only warn if runtime_library_dir_option() is called and return nothing, so runtime_library_dirs is ignored. It's debatable if it should fail here, but since cygwin is used to build unix software that might not be aware of this limitation a warning seems more fitting. In the mingw case we assume the user knows that they are targeting Windows and so we can be more strict and error out like MSVCCompiler(). In both cases we warn if runtime_library_dirs is passed to the compiler, like with MSVC.
lazka
added a commit
to msys2/MINGW-packages
that referenced
this pull request
Jun 12, 2022
Not supported on Windows In our stdlib distutils it will end up using rpath, which clang errors out on, and in upstream distutils there is a PR pending making it a proper error: pypa/distutils#150
Contributor
Author
|
Thanks! |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Jul 6, 2022
v63.1.0 Changes Merge with pypa/distutils@152c13d including pypa/distutils#155 (improved compatibility for editable installs on homebrew Python 3.9), pypa/distutils#150 (better handling of runtime_library_dirs on cygwin), and pypa/distutils#151 (remove warnings for namespace packages). v63.0.0 Breaking Changes Drop setuptools' support for installing an entrypoint extra requirements at load time: - the functionality has been broken since v60.8.0. - the mechanism to do so is deprecated (fetch_build_eggs). - that use case (e.g. a custom command class entrypoint) is covered by making sure the necessary build requirements are declared. Documentation changes Updated the example pyproject.toml -- by :user:`jacalata` This updates the documentation for the file_finders hook so that the logging recommendation aligns with the suggestion to not use distutils directly. Fix reference for keywords to point to the Core Metadata Specification instead of PEP 314 (the live standard is kept always up-to-date and consolidates several PEPs together in a single document). Reordered the User Guide's Table of Contents
|
Hi, noticed that this introduced a breaking change that was really hard to debug. see: pypa/setuptools#3450 |
This was referenced Jul 31, 2022
2 tasks
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.
On Windows there is nothing like rpath, so when CygwinCCompiler()
tries to link it will assume unix and pass rpath flags to the linker,
which will fail.
In cygwin this is currently patched away:
https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/python39.git;a=blob;f=3.1-enable-new-dtags.patch;h=716af3b14d3483e5a4
It is taking some macos fallback branch that is equal to library_dirs, which doesn't add much if
library_dirs is set, so in theory it should just return [] there.
This patch tries to bring it a bit closer to MSVCCompiler() which warns if
runtime_library_dirs is passed and raises if runtime_library_dir_option() is
called.
In the case of cygwin we only warn if runtime_library_dir_option() is called and return
nothing, so runtime_library_dirs is ignored. It's debatable if it should fail here,
but since cygwin is used to build unix software that might not be aware of this limitation
a warning seems more fitting.
In the mingw case we assume the user knows that they are targeting Windows and so we can be
more strict and error out like MSVCCompiler().
In both cases we warn if runtime_library_dirs is passed to the compiler, like with MSVC.