Skip to content
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

Avoid iterating over entry-points while an empty .egg-info exists in sys.path #4680

Merged
merged 3 commits into from
Oct 15, 2024

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant