Skip to content

Commit

Permalink
Resurrect py3-parallel-ssh, py3-ssh2-python and py3-ssh-python
Browse files Browse the repository at this point in the history
Restore these packages and their use as build-dependencies for
py3-cassandra-medusa.

Signed-off-by: dann frazier <[email protected]>
  • Loading branch information
dannf committed Dec 22, 2024
1 parent ab44305 commit 201edc0
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 82 deletions.
7 changes: 1 addition & 6 deletions py3-cassandra-medusa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
62 changes: 52 additions & 10 deletions py3-parallel-ssh.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# 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:
packages:
- build-base
- busybox
- ca-certificates-bundle
- py3-supported-build-base
- wolfi-base

pipeline:
Expand All @@ -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
Expand Down
83 changes: 49 additions & 34 deletions py3-ssh-python.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# 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
- libssh2-dev
- 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

Expand All @@ -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
Expand Down
80 changes: 48 additions & 32 deletions py3-ssh2-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@
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
- libssh2-dev
- 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

Expand All @@ -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
Expand Down

0 comments on commit 201edc0

Please sign in to comment.