-
Notifications
You must be signed in to change notification settings - Fork 73
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
[BUG] setuptools 69.4.0 breaks mpi4py installation #246
Comments
Looks like the method causing the issue was always allowed to return either Is there any change setuptools would accept the following: return [
# Force RUNPATH instead of RPATH
"-Wl,--enable-new-dtags",
"-Wl,-rpath," + dir
] to this? # Force RUNPATH instead of RPATH
return "-Wl,--enable-new-dtags,-rpath," + dir |
That change was introduced in #214 by @haampie with this rationale:
Whatever the fix is, it'll need to be contributed to distutils first and then merged here (changes directly to _distutils aren't allowed), but that can be done relatively easily and quickly. I'm transferring the issue there. |
Although Python conventions have become more rigorous in the past couple of decades, distutils is ancient and doesn't always conform to modern expectations about public/private visibility (FYI). That said, you've also observed that this function previously did return strings or lists, and that was why in the review I didn't challenge the change of return type.
Yes, maybe. My preference would be to return richer objects that more accurately reflect the semantic meaning of the operation. If That said, I'd like not to be breaking our most popular downstream projects. Here's what I propose:
|
From mpi4py side, I'm working on fixing the issue and making a new release. Therefore, a fix in setuptools's side would not be strictly required, as long as users do not try to install old versions. I'm not sure what's setuptools policy in this case. Does setuptools care about breaking install of old package versions if there is a new (patch, micro) version that fixes the install issue?
They are indeed independent, but related. However, I would still point out that with the current implementation, the |
Short answer is it depends, but generally speaking, Setuptools aims to support 99.9% of all packages currently in use. We want it to be rare for a user to have to pin to an older Setuptools to install an older package. First and foremost, we want users to feel comfortable and safe updating to the latest Setuptools version (so working at head/latest release is a viable option for most). That said, we'd also hope that users are also upgrading their other dependencies at the same cadence so that their use-case can quickly move into the future and not be reliant on older behaviors. How long do you think it would be before 99.9% of mpi4py users (that depend on builds from source) will have moved onto a new release with your fix? |
I'm slightly inclined to just ignore it, but I'm also open to suggestions (or PRs) for improvement. |
Well, it is really hard to tell. From PyPI download stats here https://www.pepy.tech/projects/mpi4py (I believe these are sdist tarballs from PyPI only), looks like there are still around 3K downloads per day for version 3.1.4 that was released in Nov 2022 (16 months ago). It is worth noting that user may not really hit the issue, unless they are building things such that passing a rpath is needed, which I believe is not the usual case (that's the reason the issue went unnoticed until today for a setuptools change from Sep 2023).
I'll take a look at setuptools tomorrow. I think there are better places to inject the To summarize, there are three options for you to choose.
I've presented you all the alternatives with pros and cons. I can contribute a PR for either (2) or (3). The decision on how to proceed is yours, just let me know. |
In case it helps with testing, I ran into the problem today when running the CI tests on GitHub for a private repository. The CI tests run the |
I keep getting reports about this failure. The issue also affected petsc4py and eventually slepc4py. Having a FOSS package in the PyPI top 1000 is not fun 🤦 I'm starting to think that the best course of action is to start by implementing as setuptools fix as per option (2) in my comment above #246 (comment). |
To be sure, the change landed in distutils in February and only was merged into Setuptools this week, so the issue is very recent. #247 implements (2) currently with a retention window of 6 months. I'll expand that to a year for good measure. Good chance it lingers longer than that. I'll leave (3) for later consideration. |
This change is merged into Setuptools and releasing as v69.4.2 and v69.5.1. |
setuptools version
69.4.0
Python version
all
OS
POSIX
Additional environment information
No response
Description
Originally reported at mpi4py/mpi4py#484
Also reported here for another project: https://gitlab.com/petsc/petsc/-/issues/1579
The commit pypa/setuptools@a131f83 changed the return type of a publich method within a public class within a public module.
Expected behavior
pip install mpi4py
should succeed with no traceback.How to Reproduce
pip install mpi4py
should be enough.However, it cannot be reproduced easily as setuptools 69.4.0 was yanked for other reasons.
Output
The text was updated successfully, but these errors were encountered: