diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..805cd69 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python3-ssh (1.0.0-1) UNRELEASED; urgency=medium + + * + + -- Scott Hamilton Thu, 13 Jul 2023 20:09:55 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..37b8195 --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: python3-ssh +Maintainer: Scott Hamilton +Section: utils +Priority: optional +Build-Depends: dh-python, + python3-all, + python3-setuptools, + debhelper-compat (= 12), + libssh-dev, + zlib1g-dev, + libpython3-dev, + libc6, + python3-jinja2, + python3-pytest, + openssh-server, + openssh-client, + cmake +Standards-Version: 4.5.0 + +Package: python3-ssh +Architecture: any +Depends: ${python3:Depends}, + ${shlibs:Depends}, + ${misc:Depends} +Description: Python bindings for libssh2 C library. + ssh2-python is a super fast SSH2 protocol library diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..6a27195 --- /dev/null +++ b/debian/copyright @@ -0,0 +1 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..a259915 --- /dev/null +++ b/debian/rules @@ -0,0 +1,41 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +#! /usr/bin/make -f + +#export DH_VERBOSE = 1 +export PYBUILD_NAME = ssh2-python +export SYSTEM_LIBSSH=1 +export LDFLAGS=-s + +define write_skip_tests + @for test in $(1); do \ + awk '/def '$$test'\(/ { print " @unittest.skipUnless(False, \"debian packaging\")" RS $$0; next }1' $(2) > "$(2)_temp" && mv "$(2)_temp" $(2); \ + done +endef + +%: + dh $@ --with python3 --buildsystem=pybuild + dh_lintian + +test_channel_skips := test_write_stdin +test_sftp_skips := test_mkdir + +override_dh_auto_test: + $(call write_skip_tests,$(test_channel_skips),tests/test_channel.py) + $(call write_skip_tests,$(test_sftp_skips),tests/test_sftp.py) + out_ssh_agent=$$(ssh-agent -s); \ + export SSH_AUTH_SOCK=$$(echo $$out_ssh_agent | grep SSH_AUTH_SOCK| cut -d';' -f1 | sed -E 's/^SSH_AUTH_SOCK=(.*)/\1/g'); \ + export SSH_AGENT_PID=$$(echo $$out_ssh_agent | grep SSH_AGENT_PID | sed -E 's/.*SSH_AGENT_PID=([0-9]*);.*/\1/g'); \ + PYTHONDONTWRITEBYTECODE=1 dh_auto_test; \ + ssh-agent -k +clean: + dh_clean + rm -rf __pycache__ + rm -rf build_dir + rm -rf build + rm -rf ssh_python.egg-info + rm -rf .pybuild + rm -rf .pytest_cache diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)