Skip to content

Conversation

@abravalheri
Copy link
Contributor

Summary of changes

Alternative to #4670

This is a much more minimal and surgical change than the originally proposed in #4670, so less controversial (which hopefully minimises the risks in merging it).

Note however that without the other changes in #4670, setuptools will keep to "temporarily" add empty .egg-info directories in sys.path... What this PR does is to simply avoid iterating over entry-points while the directory is empty.

Closes #4670

Pull Request Checklist

@abravalheri
Copy link
Contributor Author

The following task in the CI can be seen as a test (it would fail if the problem was not solved -- unless pipx installs an old version of pyproject-hooks).

pipx run --pip-args 'pyproject-hooks!=1.1' build

@abravalheri
Copy link
Contributor Author

Seems to be working as tested in pypa/build#829 (comment), courtesy of @henryiii.

I will go ahead, add a news fragment and probably merge it as I am anxious to get rid of this problem.

@jaraco, if you would like to follow a different approach (or try something more "atomic" like the original implementation #4670) we can follow up on that and revert this PR.

@abravalheri abravalheri merged commit edf39d4 into pypa:main Oct 15, 2024
25 checks passed
@abravalheri abravalheri deleted the issue-pyproject-hooks-206-take2 branch October 15, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant