From ccf8f8e7ac470eaedff9a69955db0faaa586a58e Mon Sep 17 00:00:00 2001 From: aldbr Date: Thu, 2 Apr 2026 18:04:24 +0200 Subject: [PATCH] fix: adapt to pip25.0 --- Pilot/pilotCommands.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Pilot/pilotCommands.py b/Pilot/pilotCommands.py index cbcd5c83..b6d9cef3 100644 --- a/Pilot/pilotCommands.py +++ b/Pilot/pilotCommands.py @@ -348,15 +348,12 @@ def _localInstallDIRAC(self): url, project, branch = elements elif len(elements) == 1: url = elements[0] - if url.endswith(".git"): - pipInstalling += "git+" - pipInstalling += url + gitUrl = "git+" + url if url.endswith(".git") else url if branch and project: - # e.g. git+https://github.com/fstagni/DIRAC.git@v7r2-fixes33#egg=DIRAC[pilot] - pipInstalling += "@%s#egg=%s" % (branch, project) - pipInstalling += "[pilot]" - - # pipInstalling = "pip install %s%s@%s#egg=%s[pilot]" % (prefix, url, branch, project) + # e.g. DIRAC[pilot] @ git+https://github.com/fstagni/DIRAC.git@v7r2-fixes33 + pipInstalling += "'%s[pilot] @ %s@%s'" % (project, gitUrl, branch) + else: + pipInstalling += "%s[pilot]" % gitUrl retCode, output = self.executeAndGetOutput(pipInstalling, self.pp.installEnv) if retCode: self.log.error("Could not %s [ERROR %d]" % (pipInstalling, retCode))