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

Fix for pip 19.3.1 #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix for pip 19.3.1 #95

wants to merge 1 commit into from

Conversation

mgarnica
Copy link

@mgarnica mgarnica commented Dec 6, 2019

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

@@ -39,7 +39,11 @@ def try_int(x):


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
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
Copy link

jayvdb commented Dec 10, 2019

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