Skip to content

Commit ccf8f8e

Browse files
committed
fix: adapt to pip25.0
1 parent 7feb97a commit ccf8f8e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Pilot/pilotCommands.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,12 @@ def _localInstallDIRAC(self):
348348
url, project, branch = elements
349349
elif len(elements) == 1:
350350
url = elements[0]
351-
if url.endswith(".git"):
352-
pipInstalling += "git+"
353-
pipInstalling += url
351+
gitUrl = "git+" + url if url.endswith(".git") else url
354352
if branch and project:
355-
# e.g. git+https://github.com/fstagni/DIRAC.git@v7r2-fixes33#egg=DIRAC[pilot]
356-
pipInstalling += "@%s#egg=%s" % (branch, project)
357-
pipInstalling += "[pilot]"
358-
359-
# pipInstalling = "pip install %s%s@%s#egg=%s[pilot]" % (prefix, url, branch, project)
353+
# e.g. DIRAC[pilot] @ git+https://github.com/fstagni/DIRAC.git@v7r2-fixes33
354+
pipInstalling += "'%s[pilot] @ %s@%s'" % (project, gitUrl, branch)
355+
else:
356+
pipInstalling += "%s[pilot]" % gitUrl
360357
retCode, output = self.executeAndGetOutput(pipInstalling, self.pp.installEnv)
361358
if retCode:
362359
self.log.error("Could not %s [ERROR %d]" % (pipInstalling, retCode))

0 commit comments

Comments
 (0)