From 033574ca0798eff9a3aa8156d91a5276070c31b4 Mon Sep 17 00:00:00 2001 From: Cesar Soares Date: Thu, 17 Apr 2025 16:14:51 -0700 Subject: [PATCH] Print urlbase & multiple URLs --- src/mx/_impl/mx.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mx/_impl/mx.py b/src/mx/_impl/mx.py index a38906ed..f727e66a 100755 --- a/src/mx/_impl/mx.py +++ b/src/mx/_impl/mx.py @@ -17413,7 +17413,21 @@ def _thirdpartydeps(args): if hasattr(lib, "maven") and isinstance(lib.maven, dict) and 'groupId' in lib.maven and 'artifactId' in lib.maven and 'version' in lib.maven: print("\tMaven: " + lib.maven['groupId'] + ":" + lib.maven['artifactId'] + ":" + lib.maven['version']) elif hasattr(lib, "urls") and len(lib.urls) > 0: - print("\tURL: " + lib.urls[0].split('/')[-1]) + url = lib.urls[0] + if hasattr(lib, "urlbase"): + url = url.replace("{urlbase}", lib.urlbase) + print("\tURL: " + url) + elif hasattr(lib, "_orig_attrs"): + systems = lib._orig_attrs['os_arch'] + for opsys in systems: + for architecture in lib._orig_attrs['os_arch'][opsys]: + if 'urls' in lib._orig_attrs['os_arch'][opsys][architecture]: + url = lib._orig_attrs['os_arch'][opsys][architecture]['urls'][0] + if hasattr(lib, "urlbase"): + url = url.replace("{urlbase}", lib.urlbase) + print("\tURL for " + opsys + " running on " + architecture + ": " + url) + else: + print("\tNo URL?!") # License if hasattr(lib, "theLicense") and lib.theLicense: