-
Notifications
You must be signed in to change notification settings - Fork 114
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
setuptools 69.5 breaks mpi4py installation #484
Comments
Having the same issue with my package. Surprised to see this issue TBH. Trying to find a solution. |
@niyiyu I ended up doing the following in my GHA: pip install --upgrade "setuptools<69.4.0" build wheel
pip install --no-build-isolation --no-binary=mpi4py mpi4py To the mpi4py maintainers, I'd recommend putting a version limit on setuptools in pyproject.toml and putting out a new version until the underlying issue can be fixed. Otherwise downstream dependencies are stuck with ugly hacks like what I have above. |
@paulromano thanks! We did try to set a limit on the setuptools in our PR but noticed that the setuptools we are using is actually even lower version at 65.5.0. Still digging deeper into this. Thanks for the advice! |
setuptools broke the API of public methods of public class in public modules. Even if I publish a new version, all previously published versions are uninstallable with the new setuptools. This is the second time setuptools break mpi4py installation. You should report the issue upstream to setuptools maintainers.
I'm not going to do that, more below...
I'm almost about to release a new 4.0.0 release. I'll look into what's the best course of action tomorrow.
And I'll not add an ugly upper bound pin that I'll have to maintain forever just because users find it inconvenient to add temporary ugly workaround. Again, this is the second time this happens in 20 years, so occurrences are rare, and it is ultimately not mpi4py's fault, because setuptools breaked API on everyone's back. |
Reported upstream at pypa/distutils#246. |
Completely understand @dalcinl. Regarding the change in setuptools, it looks like the possibility has existed for a while that the |
setuptools just changed their API without doing a good job advertising what the full API already was, breaking mpi4py's installer. This patch is an attempt to workaround the issue in our unit tests.
@paulromano @danielk333 My usual local setup and CI testing infrastructure seems to not trigger the issue, most likely because I'm not in need of passing rpath explicitly. I could really use your help to verify my fixes. Any chance you can try building from branch python -m venv /tmp/venv
source /tmp/venv/bin/activate
python -m pip install https://github.com/mpi4py/mpi4py/tarball/release
python -m mpi4py --version
python -m mpi4py --mpi-lib-version |
setuptools 69.5.1 was just released with a fix for this issue. Everything should be back to normal. Anyway, I'm planning to make a new mpi4py 3.1.6 release. |
@dalcinl Oh fantastic! That went at rocket speed while I was asleep. Since they released a fix i guess i wont test building anything, but feel free to poke me if me running some testing on my setup would be of help in the future. |
@danielk333 I'm waiting for Windows wheels to finish building and I'll publish a new mpi4py release. Together with the new setuptools patch release, I'm hopeful this issue will be solved for good. |
I'm not sure if this is related, but we are also having issues in our CI specifically when installing from EDIT: I pinned to 3.1.5 and our CI runs normally, so it's something in 3.1.6. |
@mrmundt That seems totally unrelated. You should submit an issue to the mpi4py-feedstock repository https://github.com/conda-forge/mpi4py-feedstock and provide a minimal reproducer (e.g. the exact |
I noticed a CI error on a project of mine when building mpi4py and after some digging determined that it is caused by a newly released version of setuptools (69.4.0) that breaks an assumption in within mpi4py. The error during installation is:
It looks like the file in question, conf/mpidistutils.py, makes an implicit assumption that the
UnixCCompiler.runtime_library_dir_option
function from setuptools/distutils returns a string:mpi4py/conf/mpidistutils.py
Lines 74 to 79 in d992746
In setuptools 69.4.0, a change was made in that function whereby it may return a list:
pypa/setuptools@a131f83
The text was updated successfully, but these errors were encountered: