From 297eac7be0a501d7b6774969a12b05dd46325d58 Mon Sep 17 00:00:00 2001 From: srishtih Date: Mon, 26 Aug 2024 18:04:07 -0700 Subject: [PATCH] Adds python versioning for py3-versioneer (#27144) Signed-off-by: Srishti Hegde --- py3-versioneer.yaml | 48 +++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/py3-versioneer.yaml b/py3-versioneer.yaml index f916ebb97b5..db717cd3c23 100644 --- a/py3-versioneer.yaml +++ b/py3-versioneer.yaml @@ -1,13 +1,22 @@ package: name: py3-versioneer version: "0.29" - epoch: 1 + epoch: 2 description: Easy VCS-based management of project version strings copyright: - license: 'Unlicense' dependencies: - runtime: - - python-3 + provider-priority: 0 + +vars: + pypi-package: versioneer + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" + 3.12: "312" environment: contents: @@ -15,10 +24,11 @@ environment: - build-base - busybox - ca-certificates-bundle - - py3-gpep517 - - py3-setuptools - - py3-wheel - - python-3 + - py3-supported-gpep517 + - py3-supported-pip + - py3-supported-python + - py3-supported-setuptools + - py3-supported-wheel - wolfi-base pipeline: @@ -27,11 +37,25 @@ pipeline: expected-sha256: 5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731 uri: https://files.pythonhosted.org/packages/source/v/versioneer/versioneer-${{package.version}}.tar.gz - - runs: | - python3 -m gpep517 build-wheel --wheel-dir dist --output-fd 1 - python3 -m installer -d "${{targets.destdir}}" dist/*.whl - - - uses: strip +subpackages: + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: ${{vars.pypi-package}} installed for python${{range.key}} + dependencies: + provides: + - py3-${{vars.pypi-package}} + provider-priority: ${{range.value}} + pipeline: + - uses: py/pip-build-install + with: + python: python${{range.key}} + - uses: strip + test: + pipeline: + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.pypi-package}} update: enabled: true