Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
I primarily use
parallel-ssh
rather than this library directly and wanted to update my environment to python 3.12. I had to go through a few steps to get it working so thought I'd try to contribute some effort in an attempt to hopefully help others.I've noticed that the main repo under the ParallelSSH org only has wheels built on PyPi for up to python 3.10 and the main maintainer of the project has not been keeping it up-to-date; as such I've been following on from the work done here that has been tracked through ParallelSSH/parallel-ssh#386 and initially added through #1
When trying to install ssh-python directly from the
next
branch I encounter the following error (note: without cython installed in my python environment)If I install
cython
into my python environment then the above command works as, from my limited understanding, that results in it rebuilding the .c files which will subsequently be compatible with python 3.12Changes made
I've updated the
libssh
version to latest stable version of 0.10.6 + a patch with a fix for some IPv6 regressions see here. This includes updating the source in the libssh folder of the repo and including a tar.gz package that is used in the manylinux docker files.I've updated the manylinux docker files to use the latest
openssl
version of 3.3.0 andkrb5
version of 1.21.2 alongside the newlibssh
versionI've updated the setup.py file to match the work done in the sibling
ssh2-python
project for python 3.12 support and then regenerated the .c files with cython 3.0.10 so that they are compatible with python 3.12. You can now installssh-python
from the repos setup.py file without cython needing to be installed in your environmentI've also updated some CI config to reference 3.12 but this is beyond my knowledge so some additional work may be required here by those more familiar
Initial
cibuidwheel
supportI also played around with
cibuildwheel
as I wanted to build wheels locally to test them; I've added some basic support for building manylinux wheels with it in theci/cibuildwheel
directory. It's only setup forCPython
onx86_64
andaarch64
at present but could be expanded upon if desired