tools/upip.py: Support == to specify exact package version.

This commit is contained in:
Christian Decker 2021-11-26 16:18:11 +01:00 committed by Damien George
parent d9d67adef1
commit e9f880482c
1 changed files with 6 additions and 2 deletions

View File

@ -192,9 +192,13 @@ def fatal(msg, exc=None):
def install_pkg(pkg_spec, install_path):
data = get_pkg_metadata(pkg_spec)
package = pkg_spec.split("==")
data = get_pkg_metadata(package[0])
latest_ver = data["info"]["version"]
if len(package) == 1:
latest_ver = data["info"]["version"]
else:
latest_ver = package[1]
packages = data["releases"][latest_ver]
del data
gc.collect()