Skip to content

Commit

Permalink
user/python-ssh2: new package
Browse files Browse the repository at this point in the history
  • Loading branch information
z-erica committed Oct 8, 2024
1 parent 64547e0 commit 4a7979e
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions user/python-ssh2/patches/no-versioneer.patch
Original file line number Diff line number Diff line change
@@ -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',
30 changes: 30 additions & 0 deletions user/python-ssh2/template.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
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: ModuleNotFoundError: No module named 'ssh2.session'
options = ["!check"]
4 changes: 4 additions & 0 deletions user/python-ssh2/update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# this isn't ssh2 on pypi
pkgname = "ssh2-python"
# ignore release candidates
ignore = ["*rc*"]

0 comments on commit 4a7979e

Please sign in to comment.