add egg_info command patch to fix pip building with setuptools==75.2.0 #26
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.
Motivation
This PR addresses an issue that surfaced with setuptools 75.2.0, most likely this PR: pypa/setuptools#4647
When you
pip install <some-source-distribution>
, the following things happen (among others):.tar.gz
into some temporary folder, say/tmp/pip-req-build-bwekzpi_
, this directory will contain the.egg-info
that was packaged with the source distribution.dist-info
directory)prepare_metadata_for_build_wheel
on the build backend (an interface from PEP 517)prepare_metadata_for_build_wheel
is just a wrapper around thedist_info
command, which again first calls theegg_info
command.dist-info
directory from the newly created.egg-info
directory (which are both in pip's temporary build context)Here's a an example where I run
pip install /path/to/test-library/dist/test_library-0.1.0.tar.gz
:The issue is that this temporary
.egg-info
directory is completely built from scratch from the python configuration files (pyproject.toml or setup.cfg). no previously generated metadata files from the original source distribution are copied.This PR adds a patch to
egg_info
to address this issue. when plux is part of the setup procedure, it detects a local pip build context and copies theplux.json
file from the extracted source distribution into the temporary build context. the remainingegg_info
command proceeds normally and will then create theentry_points.txt
correctly through theplux.json
egg-info writer plugin.Changes
plux.json
file from the original source distribution into the temporary build context when building with pip