From ca89a1e322e2e84a92e621f30414708ec5562a69 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sat, 5 Sep 2020 16:34:36 +0300 Subject: [PATCH] Fix pre-installed packages are ignored when installing a git package wheel. Reinstalling a git+http link is enough to make sure all requirements are met/installed (trains issue #196) --- trains_agent/helper/package/external_req.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trains_agent/helper/package/external_req.py b/trains_agent/helper/package/external_req.py index a739b01..bb75a08 100644 --- a/trains_agent/helper/package/external_req.py +++ b/trains_agent/helper/package/external_req.py @@ -67,7 +67,9 @@ class ExternalRequirements(SimpleSubstitution): self.post_install_req_lookup[package_name[0]] = req.req.line except: pass - if not PackageManager.out_of_scope_install_package(req_line, "--ignore-installed"): + # no need to force reinstall, pip will always rebuilt if the package comes from git + # and make sure the required packages are installed (if they are not it will install them) + if not PackageManager.out_of_scope_install_package(req_line): raise ValueError("Failed installing GIT/HTTPs package \'{}\'".format(req_line)) def replace(self, req):