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 7, 2024
1 parent 64547e0 commit dcaffb9
Show file tree
Hide file tree
Showing 2 changed files with 57 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"{url}/archive/refs/tags/{pkgver}.tar.gz"
sha256 = "70c6b6efd8ca9f8de9c2d77e7cb1d5859542588347ea426d6822b0ffd9889af3"
# check: ModuleNotFoundError: No module named 'ssh2.session'
options = ["!check"]

0 comments on commit dcaffb9

Please sign in to comment.