Skip to content

Commit

Permalink
dumb bugfix for pip index versions
Browse files Browse the repository at this point in the history
  • Loading branch information
wimglenn committed Oct 29, 2024
1 parent 2ae919d commit 28abd56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion johnnydep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Display dependency tree of Python distribution"""

__version__ = "1.20.5"
__version__ = "1.20.6"

from johnnydep.lib import *
4 changes: 3 additions & 1 deletion johnnydep/pipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ def get_versions(dist_name, index_url=None, env=None, extra_index_url=None):
log.debug("checking versions available", dist=bare_name)
if env is None:
pip_version = _get_pip_version()
exe = sys.executable
else:
pip_version = dict(env)["pip_version"]
exe = dict(env)["python_executable"]
if int(pip_version.split(".")[0]) < 24:
return _get_versions_legacy(dist_name, index_url, env, extra_index_url)
args = [
sys.executable,
exe,
"-m",
"pip",
"index",
Expand Down

0 comments on commit 28abd56

Please sign in to comment.