-
-
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 @ f3b225449 #4444
Conversation
python-pillow/Pillow#7158 (comment) suggests that Cygwin uses UnixCCompiler rather than CygwinCCompiler by default, so UnixCCompiler would need to know how to find shared libraries, import libraries, and static libraries on Cygwin.
Simply, run it for the subclasses for `UnixCCompiler`
use `os.sep` instead of hardcoding `\\` also, fix appropriate tests
it depends on pydantic-core which requires rust to work also, takes a few minutes to build.
This reverts commit be32fec.
Intentionally omitted specifying `tool.setuptools.include-package-data`: it's true by default in `pyproject.toml` according to https://setuptools.pypa.io/en/latest/userguide/datafiles.html#include-package-data. Closes jaraco/skeleton#121
…Remove project.scripts.
…pport." This reverts commit 744cf2a.
Apply ruff/refurb rules (FURB)
Use actual boolean parameters and variables
…rted distutils currently doesn't support pytest collection that doesn't start at least at the distutils dir or above (and not distutils/tests) since it requires the local distutils being imported before the tests are run, otherwise the stdlib distutils takes precedence. Adjust the pytest call to not pass a path to work around this. Since pytest currently fails to skip collecting venvs with mingw python (see pytest-dev/pytest#12544) move the venv to /tmp instead.
MSYS2 has stopped installing gcc compatibility binaries in clang environments by default some time ago, and distutils is currently hardcoded to look for "gcc", while only cc/c++ and clang/clang++ are in PATH. Work around for now by explicitely setting CC/CXX to override the defaults. Idealy distutils would try to look harder for a valid compiler before giving up, but this can be improved in the future.
Apply ruff/flake8-implicit-str-concat rules (ISC)
The goal is to standardize the format of the help text printed by commands. It is not easy to choose between brackets `[]` and parentheses `()`. I went for the docopt style, which is the closest to a standard I could find: http://docopt.org/ [...] and whether that argument has a default value ([default: 10]).
…pport Add support for building extensions using MinGW compilers
Use brackets for the default value of option arguments
Co-authored-by: DWesl <22566757+DWesl@users.noreply.github.com>
Port code from CygwinCCompiler to UnixCCompiler
5ade7db
to
aa30da4
Compare
aa30da4
to
0f6ed20
Compare
A more summarized version of the changes:
|
Tests are passing except for a nuisance diffcov check on easy_install.py. It's possibly covered on Windows, but even if not, I'm not too worried about it considering the support state of easy_install, so I'm inclined to merge without addressing the diffcov failure. |
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.
Thank you very much for working on this, Jason.
I suppose now we should add to our TODO list to incorporate mingw tests on setuptools, too.
As a brainstorm question: would it make sense to make this a major version bump in setuptools? By itself adding mingw support should be backwards compatible, but I can see that there was some change regarding cygwin too... I wonder if it would be prudent to make a major bump, just in case there are unexpected consequences.
My feeling is no. I'm happy to allow community contributions to support it, but otherwise consider it largely unsupported. Also, we should focus on incorporating distutils into setuptools rather than expanding the divergent implementations. To the extent that incorporating distutils brings the behaviors and tests into Setuptools, then we'll adopt that support (but still contingent on some community maintaining it). |
Maybe. I'm disinclined to do a major bump out of "extreme caution". I don't expect a lot of users to pin against major versions as a matter of course, or even if they do, I want the major versions to be for well-known breakage (with guidance on how to mitigate the breakage). If we start to release major versions out of undue caution, the major bump will come to be less meaningful. I think I'd prefer to have an articulable breakage before marking it as such. |
get_msvcr
functiontest_customize_compiler
run on mingwpyproject.toml
(Move project metadata topyproject.toml
jaraco/skeleton#122)ruff format
afterruff check
set
instead ofTrue
-onlydict
Summary of changes
Closes
Pull Request Checklist
newsfragments/
.(See documentation for details)