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

Generate versioned pip launchers #1918

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Feb 23, 2024

Users expect pip to have pip, pip3 and pip3.x entrypoints. But pip is a universal wheel, so it contains the pip3.x entrypoint where it was built on. To fix this, pip special cases itself when installing (https://github.com/pypa/pip/blob/3898741e29b7279e7bffe044ecfbe20f6a438b1e/src/pip/_internal/operations/install/wheel.py#L283), replacing the wheel entrypoint with one for the current version. We now do the same.

Fixes #1593

Users expect pip to have `pip`, `pip3` and `pip3.x` entrypoints. But pip is a universal wheel, so it contains the `pip3.x` entrypoint where it was built on. To fix this, pip special cases itself when installing (https://github.com/pypa/pip/blob/3898741e29b7279e7bffe044ecfbe20f6a438b1e/src/pip/_internal/operations/install/wheel.py#L283), replacing the wheel entrypoint with one for the current version. We now do the same.

Fixes #1593
@konstin konstin added bug Something isn't working compatibility Compatibility with a specification or another tool labels Feb 23, 2024
@konstin konstin enabled auto-merge (squash) February 23, 2024 17:29
@konstin konstin merged commit 11ed4f7 into main Feb 23, 2024
7 checks passed
@konstin konstin deleted the konsti/special-case-pip-entrypoint-names branch February 23, 2024 18:01
@konstin konstin restored the konsti/special-case-pip-entrypoint-names branch February 23, 2024 18:06
konstin added a commit that referenced this pull request Feb 26, 2024
Update #1918 to handle pypa/pip#12536, where pip removed their python minor entrypoints.

Closes #1593.
konstin added a commit that referenced this pull request Feb 26, 2024
Update #1918 to handle pypa/pip#12536, where pip removed their python minor entrypoints.

Closes #1593.
konstin added a commit that referenced this pull request Feb 28, 2024
Update #1918 to handle pypa/pip#12536, where pip removed their python minor entrypoints.

Closes #1593.
konstin added a commit that referenced this pull request Mar 1, 2024
Update #1918 to handle pypa/pip#12536, where pip
removed their python minor entrypoint. The pip test is semi-functional
since it builds pip from source instead of using a wheel with the wrong
entrypoint, we have to update it when this pip version has a release.

Closes #1593.
@konstin konstin deleted the konsti/special-case-pip-entrypoint-names branch April 29, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Compatibility with a specification or another tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Special case pip entrypoint names
2 participants