Skip to content

Patch mx thirdpartydeps to print URLs of libraries that have multiple URLs & include urlbase #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down