Skip to content

Commit 469fa56

Browse files
committed
fix(tests): Replace removed egg syntax with dependency links
1 parent c4e89ab commit 469fa56

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

docs/source/AdministratorGuide/HowTo/SystemAdministratorInterface.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ A version can be:
256256

257257
* a PEP440 valid version of DIRAC.
258258
* a PEP440 valid version of a DIRAC extension.
259-
* "integration" or "devel" or "master" or "main" would all be interpreted as git+https://github.com/DIRACGrid/DIRAC.git@integration#egg=DIRAC[server]
260-
* a git tag/branch like git+https://github.com/fstagni/DIRAC.git@test_branch#egg=DIRAC[server]
259+
* "integration" or "devel" or "master" or "main" would all be interpreted as ``DIRAC[server] @ git+https://github.com/DIRACGrid/DIRAC.git@integration``
260+
* a dependency link pointing to a git tag/branch like ``DIRAC[server] @ git+https://github.com/fstagni/DIRAC.git@test_branch``
261261

262262
Usage::
263263

@@ -267,4 +267,4 @@ For example::
267267

268268
update 9.0.18
269269
update integration
270-
update git+https://github.com/fstagni/DIRAC.git@test_branch#egg=DIRAC[server]
270+
update 'DIRAC[server] @ git+https://github.com/fstagni/DIRAC.git@test_branch'

src/DIRAC/FrameworkSystem/Service/SystemAdministratorHandler.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ def export_updateSoftware(self, version):
259259
A version can be:
260260
- a PEP440 valid version of DIRAC.
261261
- a PEP440 valid version of a DIRAC extension.
262-
- "integration" or "devel" or "master" or "main" would all be interpreted as git+https://github.com/DIRACGrid/DIRAC.git@integration#egg=DIRAC[server]
263-
- a git tag/branch like git+https://github.com/fstagni/DIRAC.git@test_branch#egg=DIRAC[server]
262+
- "integration" or "devel" or "master" or "main" would all be interpreted as "DIRAC[server] @ git+https://github.com/DIRACGrid/DIRAC.git@integration"
263+
- a git tag/branch like "DIRAC[server] @ git+https://github.com/fstagni/DIRAC.git@test_branch"
264264
"""
265265
# Validate and normalise the requested version
266266
primaryExtension = None
@@ -273,7 +273,7 @@ def export_updateSoftware(self, version):
273273
# Special cases (e.g. installing the integration/main branch)
274274
if version.lower() in ["integration", "devel", "master", "main"]:
275275
released_version = False
276-
version = "git+https://github.com/DIRACGrid/DIRAC.git@integration#egg=DIRAC[server]"
276+
version = "DIRAC[server] @ git+https://github.com/DIRACGrid/DIRAC.git@integration"
277277

278278
if released_version:
279279
try:
@@ -340,8 +340,15 @@ def export_updateSoftware(self, version):
340340
else:
341341
# from here on we assume a version like git+https://github.com/DIRACGrid/DIRAC.git@integration#egg=DIRAC[server]
342342
# is specified, for the primaryExtension
343-
if not version.startswith("git+"):
344-
version = f"git+{version}"
343+
if "#egg=" in version:
344+
if not version.startswith("git+"):
345+
version = f"git+{version}"
346+
347+
# pip removed support for egg= syntax, convert to current syntax but warn
348+
url, _, spec = version.rpartition("#egg=")
349+
version = f"{spec} @ {url}"
350+
self.log.warn("The #egg= syntax has been removed from pip, using:", version)
351+
345352
cmd += [version]
346353

347354
cmd += [f"{e}[server]" for e in otherExtensions]

tests/Jenkins/utilities.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,9 @@ installDIRAC() {
297297

298298
if [[ -n "${INSTALLATION_BRANCH}" ]]; then
299299
# Use this for (e.g.) running backward-compatibility tests
300-
echo "pip-installing DIRAC from git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"
301-
pip install "git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"
300+
dirac_spec="DIRAC[client] @ git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}"
301+
echo "pip-installing DIRAC from $dirac_spec"
302+
pip install "$dirac_spec"
302303
else
303304
for module_path in "${ALTERNATIVE_MODULES[@]}"; do
304305
# Special handling for DIRAC with DIRACCommon subdirectory

0 commit comments

Comments
 (0)