Parse wheel metadata

Change-Id: I3e76c3f0a38cd50498e0ddc431f18b60ba134f35
This commit is contained in:
Tim Burke 2024-10-09 16:23:37 -07:00
parent 29f1add6ba
commit 44833eafe7

View File

@ -24,4 +24,10 @@
url: 'artifacts/{{ item.path | basename }}'
metadata:
type: python_wheel
# TODO: parse further metadata from basename (python tag, ABI tag)
package: '{{ (item.path | basename | split("-") ).0 }}'
version: '{{ (item.path | basename | split("-") ).1 }}'
# according to https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/
# there may or may not be a "build tag" next, whatever that is
python-tag: '{{ (item.path | basename | split("-") )[-3] }}'
abi-tag: '{{ (item.path | basename | split("-") )[-2] }}'
platform-tag: '{{ (item.path[:-4] | basename | split("-") )[-1].split(".") }}'