From 2549bff9b81bc1b3295d418c1155d80ea3ed76c2 Mon Sep 17 00:00:00 2001 From: Justin Vreeland Date: Fri, 23 Aug 2024 12:40:27 -0700 Subject: [PATCH 1/2] py3-xattr: multi-versionize --- py3-xattr.yaml | 70 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/py3-xattr.yaml b/py3-xattr.yaml index 28135d3470b..7123d3bb2a2 100644 --- a/py3-xattr.yaml +++ b/py3-xattr.yaml @@ -2,14 +2,22 @@ package: name: py3-xattr version: 1.1.0 - epoch: 1 + epoch: 2 description: Python wrapper for extended filesystem attributes copyright: - license: MIT dependencies: - runtime: - - py3-cffi - - python-3 + provider-priority: 0 + +vars: + pypi-package: xattr + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" + 3.12: "312" environment: contents: @@ -17,9 +25,10 @@ environment: - build-base - busybox - ca-certificates-bundle - - py3-setuptools - - python-3 - - python3-dev + - openssf-compiler-options + - py3-supported-cffi + - py3-supported-pip + - py3-supported-python-dev - wolfi-base pipeline: @@ -29,10 +38,51 @@ pipeline: tag: v${{package.version}} expected-commit: 13ae4e93b7489b80e11dbe7989e67f9b5bd3f0cd - - name: Python Build - uses: python/build-wheel +subpackages: + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: python${{range.key}} version of ${{vars.pypi-package}} + dependencies: + provider-priority: ${{range.value}} + runtime: + - py${{range.key}}-cffi + 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}} + + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}}-bin + description: Executable binaries for ${{vars.pypi-package}} installed for python${{range.key}} + dependencies: + runtime: + - py${{range.key}}-${{vars.pypi-package}} + provides: + - py3-${{vars.pypi-package}} + provider-priority: ${{range.value}} + pipeline: + - runs: | + mkdir -p ${{targets.contextdir}}/usr + mv ${{targets.contextdir}}/../py${{range.key}}-${{vars.pypi-package}}/usr/bin ${{targets.contextdir}}/usr + test: + pipeline: + - runs: | + xattr -h - - uses: strip +test: + pipeline: + - runs: | + xattr -h + - uses: python/import + with: + import: ${{vars.pypi-package}} update: enabled: true From 31da8c85c16d70f19b3d32b21e24e0edd898b9f2 Mon Sep 17 00:00:00 2001 From: Justin Vreeland Date: Thu, 5 Sep 2024 15:43:38 -0700 Subject: [PATCH 2/2] py3-tomlkit: Multiversionize --- py3-tomlkit.yaml | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/py3-tomlkit.yaml b/py3-tomlkit.yaml index e84a255713e..dd488821e1d 100644 --- a/py3-tomlkit.yaml +++ b/py3-tomlkit.yaml @@ -2,23 +2,30 @@ package: name: py3-tomlkit version: 0.13.2 - epoch: 0 + epoch: 1 description: Style preserving TOML library copyright: - license: MIT dependencies: - runtime: - - python3 + provider-priority: 0 + +vars: + pypi-package: tomlkit + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" + 3.12: "312" environment: contents: packages: - busybox - ca-certificates-bundle - - py3-build - - py3-installer - - py3-setuptools - - python3 + - py3-supported-pip + - py3-supported-poetry-core - wolfi-base pipeline: @@ -28,13 +35,25 @@ pipeline: tag: ${{package.version}} expected-commit: e6e5d3803ba2942c5e19e3c083d289009c27338c - - name: Python Build - runs: | - python -m build - python3 -m installer -d "${{targets.destdir}}" dist/*.whl - find ${{targets.destdir}} -name "*.pyc" -exec rm -rf '{}' + - - - uses: strip +subpackages: + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: python${{range.key}} version of ${{vars.pypi-package}} + dependencies: + provider-priority: ${{range.value}} + provides: + - py3-${{vars.pypi-package}} + 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