From c49e3be5127ed87c91dfeaa38eaad2a48c836353 Mon Sep 17 00:00:00 2001 From: "Jeremy T. Bouse" Date: Tue, 27 May 2014 18:14:08 -0400 Subject: Add Python 3 support to build Closes: #697600, #749512 Thanks: Thomas Goirand --- debian/compat | 2 +- debian/control | 31 ++++++++++++++++++++++++++----- debian/python-paramiko.install | 1 - debian/rules | 37 ++++++++++++++++++++++++------------- 4 files changed, 51 insertions(+), 20 deletions(-) delete mode 100644 debian/python-paramiko.install diff --git a/debian/compat b/debian/compat index 45a4fb7..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index dd92009..a3c0652 100644 --- a/debian/control +++ b/debian/control @@ -3,12 +3,18 @@ Section: python Priority: optional Maintainer: Jeremy T. Bouse Uploaders: Guido Guenther -Build-Depends: debhelper (>> 8), +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 +Build-Depends: debhelper (>> 9), python-all (>= 2.6.6-3~), python-crypto (>= 2.1.0-2), python-ecdsa, python-setuptools, - python-epydoc + python-epydoc, + python3-all, + python3-crypto, + python3-ecdsa, + python3-setuptools Standards-Version: 3.9.5 Homepage: https://github.com/paramiko/paramiko/ Vcs-Git: https://github.com/jbouse-debian/paramiko.git @@ -32,9 +38,9 @@ Description: Make ssh v2 connections with Python (Documentation) Package: python-paramiko Package-Type: deb Architecture: all -Depends: ${misc:Depends}, - ${python:Depends}, - python-crypto (>= 2.1.0-2) +Depends: python-crypto (>= 2.1.0-2), + ${misc:Depends}, + ${python:Depends} Provides: ${python:Provides} Description: Make ssh v2 connections with Python (Python 2) This is a library for making SSH2 connections (client or server). @@ -43,3 +49,18 @@ Description: Make ssh v2 connections with Python (Python 2) are supported. SFTP client and server mode are both supported too. . This is the Python 2 version of the package. + +Package: python3-paramiko +Package-Type: deb +Architecture: all +Depends: python3-crypto (>= 2.1.0-2), + ${misc:Depends}, + ${python3:Depends} +Provides: ${python3:Provides} +Description: Make ssh v2 connections with Python (Python 3) + This is a library for making SSH2 connections (client or server). + Emphasis is on using SSH2 as an alternative to SSL for making secure + connections between Python scripts. All major ciphers and hash methods + are supported. SFTP client and server mode are both supported too. + . + This is the Python 3 version of the package. diff --git a/debian/python-paramiko.install b/debian/python-paramiko.install deleted file mode 100644 index b2cc136..0000000 --- a/debian/python-paramiko.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/python2* diff --git a/debian/rules b/debian/rules index 4703c01..16a5683 100755 --- a/debian/rules +++ b/debian/rules @@ -1,33 +1,44 @@ #!/usr/bin/make -f -PYTHON2=$(shell pyversions -vr) +PY3VERS=$(shell py3versions -vr) %: - dh $@ --with python2 - -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) -test-python%: - python$* setup.py test -vv - -override_dh_auto_test: $(PYTHON2:%=test-python%) -endif + dh $@ --with python2,python3 build-python%: python$* setup.py build -override_dh_auto_build: $(PYTHON2:%=build-python%) - dh_auto_build +test-python%: + python$* setup.py test -vv install-python%: python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb -override_dh_auto_install: $(PYTHON2:%=install-python%) +override_dh_auto_build: $(PY3VERS:%=build-python%) + dh_auto_build + +override_dh_auto_test: $(PY3VERS:%=test-python%) + dh_auto_test + +override_dh_auto_install: $(PY3VERS:%=install-python%) dh_auto_install -override_dh_installdocs: +override_dh_install: + dh_install "debian/tmp/usr/lib/python2*" -p python-paramiko + dh_install "debian/tmp/usr/lib/python3*" -p python3-paramiko + dh_install + +override_dh_installdocs: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) epydoc --no-private -o docs/ paramiko +endif dh_installdocs +override_dh_clean: + dh_clean + rm -rf build + rm -rf docs/a*.* docs/b* docs/c* docs/e* docs/f* docs/h* docs/id* docs/l* docs/m* docs/pa* docs/r* docs/st* docs/t* docs/u* + # Commands not to run override_dh_installcatalogs override_dh_installcron: override_dh_installdebconf override_dh_installemacsen override_dh_installifupdown: -- cgit v1.2.3