Fix ModuleNotFoundError during pip install #8
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.
When trying to
pip install crlibm
, aModuleNotFoundError
appears, breaking the install.The module not found is
distutils.command.upload
, which has been removed in setuptools' recently published version 75.0.0. That module is depended upon by this project'ssetup.py
.When the build dependencies haven't been declared, pip will follow this fallback behavior and fetch the latest version of setuptools, which from above is no longer compatible.
To fix the issue, this PR adds a minimal
pyproject.toml
file to declare a dependency on setuptools prior to the breaking version.How to reproduce
Example error message
Workaround
For projects that depend on crlibm while this fix hasn't been merged, I have found a workaround.
setuptools<75.0.0
to your project dependencies (to install the version of setuptools prior to the breaking change)--no-build-isolation
flag when you dopip install
oruv sync
(to use build dependencies defined in your project rather than in each dependency)Note that this is a very precarious workaround - it assumes all your dependencies can be built with the same build dependencies.