Skip to content
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

ruff: update to 0.8.5 #22963

Merged
merged 1 commit into from
Jan 3, 2025
Merged

ruff: update to 0.8.5 #22963

merged 1 commit into from
Jan 3, 2025

Conversation

ognevny
Copy link
Collaborator

@ognevny ognevny commented Jan 2, 2025

No description provided.

@ognevny
Copy link
Collaborator Author

ognevny commented Jan 2, 2025

?

Pip Check Failed for mingw-w64-ucrt-x86_64-python-ruff
Running `pip check` didn't suceed. Maybe missing dependencies?
Here is what it failed.
ruff 0.8.5 is not supported on this platform

@lazka
Copy link
Member

lazka commented Jan 2, 2025

hm, yeah pip complains about that now, I need to have a look

@lazka
Copy link
Member

lazka commented Jan 2, 2025

pip is now checking that the "Tag" in site-packages/ruff-0.8.4.dist-info/WHEEL matches the platform of the Python installation.

Sadly maturin is hardcoding it on Windows: https://github.com/PyO3/maturin/blob/f5b807eaf3f576ea08e6a574d699fc6f54e2be46/src/build_context.rs#L482-L484 producing "invalid" wheels for us.

A workaround would be:

diff --git a/mingw-w64-ruff/PKGBUILD b/mingw-w64-ruff/PKGBUILD
index 0589c588e6..ad8097697a 100644
--- a/mingw-w64-ruff/PKGBUILD
+++ b/mingw-w64-ruff/PKGBUILD
@@ -40,6 +40,7 @@ prepare() {
 build() {
   cd "${_realname}"

+  export _PYTHON_HOST_PLATFORM=$(python -c "import sysconfig, sys; sys.stdout.write(sysconfig.get_platform())")
   export WINAPI_NO_BUNDLED_LIBRARIES=1
   maturin build --release --strip --frozen --all-features
 }

On discord I got a pointer to an issue for related issues: pypa/pip#12884

@ognevny
Copy link
Collaborator Author

ognevny commented Jan 3, 2025

thanks

@ognevny ognevny merged commit 04c84cf into msys2:master Jan 3, 2025
7 checks passed
@ognevny ognevny deleted the update-ruff branch January 3, 2025 06:16
ognevny added a commit that referenced this pull request Jan 3, 2025
recent pip update introduced a new check for WHEEL files, and such files produced by maturin are
hardcoded to add `win32` platform, which is different to one from mingw cpython. see #22963 (comment).
adding without rebuild just to prevent confusions in case of package update (and while it's not fixed
in maturin upstream)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants