diff --git a/py3-cairo.yaml b/py3-cairo.yaml index e2fd869342..e557601305 100644 --- a/py3-cairo.yaml +++ b/py3-cairo.yaml @@ -6,8 +6,19 @@ package: copyright: - license: LGPL-2.0-or-later dependencies: - runtime: - - python3 + provider-priority: 0 + +vars: + pypi-package: cairo + import: cairo + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" + 3.12: "312" + 3.13: "300" environment: contents: @@ -21,9 +32,10 @@ environment: - fontconfig-dev - freetype-dev - libpng-dev - - meson - openssf-compiler-options - - python3-dev + - py3-supported-meson-python + - py3-supported-pip + - py3-supported-python-dev - zlib-dev pipeline: @@ -42,18 +54,70 @@ pipeline: - uses: meson/install - - runs: python3 -m compileall "${{targets.destdir}}"/usr/lib + - runs: | + # python-version-specific files will be provided by subpackages + rm -rf ${{targets.destdir}}/usr/lib/python* - uses: strip subpackages: - - name: py3-cairo-dev + - range: py-versions + name: py${{range.key}}-${{vars.pypi-package}} + description: python${{range.key}} version of ${{vars.pypi-package}} + dependencies: + provides: + - py3-${{vars.pypi-package}} + provider-priority: ${{range.value}} pipeline: - - uses: split/dev + - uses: py/pip-build-install + with: + python: python${{range.key}} + - uses: strip + test: + pipeline: + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.import}} + environment: + contents: + packages: + - py3-supported-${{vars.pypi-package}} + + - name: py3-supported-${{vars.pypi-package}} + description: meta package providing ${{vars.pypi-package}} for supported python versions. dependencies: runtime: - - py3-cairo + - py3.10-${{vars.pypi-package}} + - py3.11-${{vars.pypi-package}} + - py3.12-${{vars.pypi-package}} + - py3.13-${{vars.pypi-package}} + test: + pipeline: + - uses: python/import + with: + python: python3.10 + import: ${{vars.import}} + - uses: python/import + with: + python: python3.11 + import: ${{vars.import}} + - uses: python/import + with: + python: python3.12 + import: ${{vars.import}} + - uses: python/import + with: + python: python3.13 + import: ${{vars.import}} + + - name: py3-cairo-dev description: py3-cairo dev + dependencies: + runtime: + - py3-cairo + pipeline: + - uses: split/dev update: enabled: true