diff --git a/user/python-ssh2/patches/no-versioneer.patch b/user/python-ssh2/patches/no-versioneer.patch new file mode 100644 index 0000000000..f6c7839515 --- /dev/null +++ b/user/python-ssh2/patches/no-versioneer.patch @@ -0,0 +1,27 @@ +diff -ruN a/setup.py b/setup.py +--- a/setup.py 2022-07-31 15:40:32.000000000 +0200 ++++ b/setup.py 2024-10-07 12:08:37.338347135 +0200 +@@ -5,7 +5,6 @@ + + from _setup_libssh2 import build_ssh2 + +-import versioneer + from setuptools import setup, find_packages + + cpython = platform.python_implementation() == 'CPython' +@@ -87,13 +86,13 @@ + 'msvc*.dll', 'vcruntime*.dll', + ]) + +-cmdclass = versioneer.get_cmdclass() ++cmdclass = {} + if USING_CYTHON: + cmdclass['build_ext'] = build_ext + + setup( + name='ssh2-python', +- version=versioneer.get_version(), ++ version=os.getenv('SSH2_PYTHON_VERSION'), + cmdclass=cmdclass, + url='https://github.com/ParallelSSH/ssh2-python', + license='LGPLv2', diff --git a/user/python-ssh2/template.py b/user/python-ssh2/template.py new file mode 100644 index 0000000000..c668194ab1 --- /dev/null +++ b/user/python-ssh2/template.py @@ -0,0 +1,30 @@ +pkgname = "python-ssh2" +pkgver = "1.0.0" +pkgrel = 0 +build_style = "python_pep517" +make_build_env = { + "SSH2_PYTHON_VERSION": pkgver, + "SYSTEM_LIBSSH2": "1", +} +hostmakedepends = [ + "python-build", + "python-cython", + "python-installer", + "python-setuptools", +] +makedepends = [ + "libssh2-devel", + "python-devel", +] +checkdepends = [ + "python-jinja2", + "python-pytest", +] +pkgdesc = "Python bindings for libssh2" +maintainer = "Erica Z " +license = "LGPL-2.1-only" +url = "https://github.com/ParallelSSH/ssh2-python" +source = f"$(PYPI_SITE)/s/ssh2-python/ssh2-python-{pkgver}.tar.gz" +sha256 = "af89e80c3203e7829b24eea688eaf5c5e279071aed1882238b4f44ec2144e7c5" +# check: no tests +options = ["!check"] diff --git a/user/python-ssh2/update.py b/user/python-ssh2/update.py new file mode 100644 index 0000000000..ddf5c55b44 --- /dev/null +++ b/user/python-ssh2/update.py @@ -0,0 +1,4 @@ +# this isn't ssh2 on pypi +pkgname = "ssh2-python" +# ignore release candidates +ignore = ["*rc*"]