Remove build-time dependency on six, add pyproject.toml file #69
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.
Type of Change
What Changes Were Made
Hi, I'm Richard! I'm part of the pip core team.
Starting with pip 25.1, we've deprecated the legacy
setup.py bdist_wheel
based mechanism for building projects. Once the legacy mechanism is removed, pip will exclusively use the modern interface (PEP 517 mode) for installers (e.g., pip) to ask a build backend (e.g., setuptools) to build the project into a wheel (which pip knows how to install).For more information, please read the deprecation issue: pypa/pip#6334.
While most projects should NOT be impacted as the modern mechanism is largely backwards compatible, your project has been identified as one which will fail to install from source when PEP 517 mode is enabled. Most end-users will NOT be affected as the vast majority of installs are fulfilled using pre-built wheels. However, some users (and especially repackagers) prefer to build+install their dependencies from source.
The failure is caused by build isolation which is enabled in PEP 517 mode. Build isolation means that pip will create a temporary Python environment to build the project in, whereas with the legacy behaviour the build occurs within the Python environment where pip is installed.
Your project's
setup.py
file relies onsix
being pre-installed. If six is not installed, pip will not be able to build nor install your project.Example failure
I took a look at your
setup.py
and it looks to me that six is in fact not required, thus I've removed it fromsetup.py
entirely. I've also added apyproject.toml
file in which setuptools is declared as your project's build system. This informs installers which packages are needed in order to build the project. Its presence will also cause pip to default to PEP 517 mode for your project, which will help to ensure your project will continue to install correctly with modern pip (and alternative installers likeuv pip
).If you have any questions, I'd be happy to answer them! It doesn't matter if they're about the pip deprecation specifically or modern Python packaging in general. Thank you!