Skip to content

Fix for pip 19.3.1#95

Open
mgarnica wants to merge 1 commit into
wolever:masterfrom
mgarnica:pip_19_3_0
Open

Fix for pip 19.3.1#95
mgarnica wants to merge 1 commit into
wolever:masterfrom
mgarnica:pip_19_3_0

Conversation

@mgarnica

@mgarnica mgarnica commented Dec 6, 2019

Copy link
Copy Markdown

Fixes #94
import main function from pip._internal.main for pip 19.3.1

Comment thread libpip2pi/commands.py
if pip_version:
if pip_version >= (10, 0, 0):
if pip_version >= (19, 3, 1):
from pip._internal.main import main as pip_main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, that as pip user guide suggests to use pip program and the pip program is defined in entry points in setup.py, would getting that entry point to be a version independent way to find main function. Could something like this work:

Suggested change
from pip._internal.main import main as pip_main
pip_main = pkg_resources.load_entry_point('pip', 'console_scripts', 'pip')

@jayvdb

jayvdb commented Dec 10, 2019

Copy link
Copy Markdown

fwiw, I've tested this PR on openSUSE Tumbleweed, and it fixed my builds.

Created #100 for a longer-term solution.

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.

pip 19.3 breaks pip2pi 0.8.1

3 participants