diff --git a/py3-cassandra-medusa.yaml b/py3-cassandra-medusa.yaml index 711a666fa13..951ca1290d7 100644 --- a/py3-cassandra-medusa.yaml +++ b/py3-cassandra-medusa.yaml @@ -28,6 +28,7 @@ package: - py${{vars.py-version}}-grpcio - py${{vars.py-version}}-grpcio-health-checking - py${{vars.py-version}}-idna + - py${{vars.py-version}}-parallel-ssh - py${{vars.py-version}}-psutil - py${{vars.py-version}}-pyopenssl - py${{vars.py-version}}-requests @@ -62,12 +63,6 @@ pipeline: - runs: | # Setup the virtualenv python${{vars.py-version}} -m venv .venv --system-site-packages - - - name: Install deps from PyPI that aren't currently packaged in wolfi - runs: | - .venv/bin/pip${{vars.py-version}} install -I parallel-ssh --no-compile --no-deps - .venv/bin/pip${{vars.py-version}} install -I ssh2-python --no-compile --no-deps - .venv/bin/pip${{vars.py-version}} install -I ssh-python --no-compile --no-deps .venv/bin/pip${{vars.py-version}} install -I .wheels/${{vars.py-version}}/*.whl --no-compile --no-deps - runs: | diff --git a/py3-parallel-ssh.yaml b/py3-parallel-ssh.yaml index 0daf8145392..68988ab04a0 100644 --- a/py3-parallel-ssh.yaml +++ b/py3-parallel-ssh.yaml @@ -1,17 +1,22 @@ -# Generated from https://pypi.org/project/parallel-ssh/ package: name: py3-parallel-ssh version: 2.12.0 - epoch: 1 + epoch: 2 description: Asynchronous parallel SSH library copyright: - license: LGPL-2.1-or-later dependencies: - runtime: - - py3-gevent - - py3-ssh2-python - - py3-ssh-python - - python3 + provider-priority: 0 + +vars: + pypi-package: parallel-ssh + import: pssh + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" environment: contents: @@ -19,6 +24,7 @@ environment: - build-base - busybox - ca-certificates-bundle + - py3-supported-build-base - wolfi-base pipeline: @@ -31,10 +37,46 @@ pipeline: with: patches: config-parser.patch - - 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: + provides: + - py3-${{vars.pypi-package}} + provider-priority: ${{range.value}} + runtime: + - py${{range.key}}-gevent + - py${{range.key}}-ssh2-python + - py${{range.key}}-ssh-python + 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.import}} - - uses: strip + - name: py3-supported-${{vars.pypi-package}} + description: meta package providing ${{vars.pypi-package}} for supported python versions. + dependencies: + runtime: + - py3.10-${{vars.pypi-package}} + - py3.11-${{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}} update: enabled: true diff --git a/py3-ssh-python.yaml b/py3-ssh-python.yaml index 54a21312036..bdcdac14f7c 100644 --- a/py3-ssh-python.yaml +++ b/py3-ssh-python.yaml @@ -1,20 +1,27 @@ -# Generated from https://pypi.org/project/ssh-python/ package: name: py3-ssh-python version: 1.0.0 - epoch: 1 + epoch: 2 description: libssh C library bindings for Python. copyright: - license: LGPL-2.1-only dependencies: - runtime: - - python3 + provider-priority: 0 + +vars: + pypi-package: ssh-python + import: ssh + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" environment: contents: packages: - build-base - - busybox - ca-certificates-bundle - cmake - libssh2 @@ -22,10 +29,7 @@ environment: - libssl3 - openssl - openssl-dev - - py3.11-installer - - py3.11-pip - - python-3.11 - - python-3.11-dev + - py3-supported-build-base-dev - zlib - zlib-dev @@ -39,32 +43,43 @@ pipeline: - uses: patch with: patches: config-parser.patch +subpackages: + - 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: py/pip-build-install + with: + python: python${{range.key}} + - uses: strip + test: + pipeline: + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.import}} - - name: Python Build - runs: | - pip install wheel - python setup.py bdist_wheel - - - runs: | - # Setup the virtualenv - python -m venv .venv --system-site-packages - # Bump pip to patch a CVE - .venv/bin/pip install --upgrade pip==23.3.2 setuptools==65.5.1 - - - runs: | - .venv/bin/pip install -I --no-compile dist/*.whl - - - runs: | - mkdir -p ${{targets.destdir}}/usr/share/py3-ssh - mv .venv ${{targets.destdir}}/usr/share/py3-ssh/ - - # edit the venv paths - sed -i "s|/home/build|/usr/share/py3-ssh|g" ${{targets.destdir}}/usr/share/py3-ssh/.venv/bin/* - - # allow site-packages - sed -i "s|include-system-site-packages = false|include-system-site-packages = true|g" ${{targets.destdir}}/usr/share/py3-ssh/.venv/pyvenv.cfg - - - uses: strip + - name: py3-supported-${{vars.pypi-package}} + description: meta package providing ${{vars.pypi-package}} for supported python versions. + dependencies: + runtime: + - py3.10-${{vars.pypi-package}} + - py3.11-${{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: strip update: enabled: true diff --git a/py3-ssh2-python.yaml b/py3-ssh2-python.yaml index 89bac4330e6..7d587cb3ab1 100644 --- a/py3-ssh2-python.yaml +++ b/py3-ssh2-python.yaml @@ -2,19 +2,27 @@ package: name: py3-ssh2-python version: 1.0.0 - epoch: 1 + epoch: 2 description: Bindings for libssh2 C library copyright: - license: LGPL-2.1-only dependencies: - runtime: - - python-3 + provider-priority: 0 + +vars: + pypi-package: ssh2-python + import: ssh2 + +data: + - name: py-versions + items: + 3.10: "310" + 3.11: "311" environment: contents: packages: - build-base - - busybox - ca-certificates-bundle - cmake - libssh2 @@ -22,10 +30,7 @@ environment: - libssl3 - openssl - openssl-dev - - py3.11-installer - - py3.11-pip - - python-3.11 - - python-3.11-dev + - py3-supported-build-base-dev - zlib - zlib-dev @@ -40,31 +45,42 @@ pipeline: with: patches: config-parser.patch - - name: Python Build - runs: | - pip install wheel - python setup.py bdist_wheel - - - runs: | - # Setup the virtualenv - python -m venv .venv --system-site-packages - # Bump pip to patch a CVE - .venv/bin/pip install --upgrade pip==23.3.2 setuptools==65.5.1 - - - runs: | - .venv/bin/pip install -I --no-compile dist/*.whl - - - runs: | - mkdir -p ${{targets.destdir}}/usr/share/py3-ssh2 - mv .venv ${{targets.destdir}}/usr/share/py3-ssh2/ - - # edit the venv paths - sed -i "s|/home/build|/usr/share/py3-ssh2|g" ${{targets.destdir}}/usr/share/py3-ssh2/.venv/bin/* - - # allow site-packages - sed -i "s|include-system-site-packages = false|include-system-site-packages = true|g" ${{targets.destdir}}/usr/share/py3-ssh2/.venv/pyvenv.cfg +subpackages: + - 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: py/pip-build-install + with: + python: python${{range.key}} + - uses: strip + test: + pipeline: + - uses: python/import + with: + python: python${{range.key}} + import: ${{vars.import}} - - uses: strip + - name: py3-supported-${{vars.pypi-package}} + description: meta package providing ${{vars.pypi-package}} for supported python versions. + dependencies: + runtime: + - py3.10-${{vars.pypi-package}} + - py3.11-${{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}} update: enabled: true