dev-python/paramiko: version bump to 2.6.0
authorTim Harder <radhermit@gentoo.org>
Sat, 6 Jul 2019 08:25:31 +0000 (02:25 -0600)
committerTim Harder <radhermit@gentoo.org>
Sat, 6 Jul 2019 08:27:24 +0000 (02:27 -0600)
Signed-off-by: Tim Harder <radhermit@gentoo.org>
dev-python/paramiko/Manifest
dev-python/paramiko/files/paramiko-2.6.0-tests.patch [new file with mode: 0644]
dev-python/paramiko/paramiko-2.6.0.ebuild [new file with mode: 0644]

index 08ccf16d34eeef05cad88666c48e7e0c9b69062e..cedc946bc4931e1edf726382844d64c24245c870 100644 (file)
@@ -1 +1,2 @@
 DIST paramiko-2.4.2.tar.gz 289126 BLAKE2B 767f81a09b32762241eed6661e520e3b3a96acfe8e6e638ea7ae180a8b6866f8f4adeae0a0146d46ecbfccbe71334c5f5c14e2d049744258ca4808ac21365185 SHA512 894c2ebfcfb35a84fe74670d0eb67022a49b7bf165f31acd929045c17509d8a2be111e8319f20513b5034efd033edc6432b2ca2e7027dc7e3c6703166a96790f
+DIST paramiko-2.6.0.tar.gz 304469 BLAKE2B cde861069c8924b2f685675266fd28600ffd24a39074e9ad5db8fd1d010c6e23ca13a2c78a79b23504dfff395b773b171e7c787119d01e3b92a2eec44ca8b40a SHA512 1ac2c3486cb786a1e4640d7b7f8628087f9b78ee247b09dbd3ac2646790da4f12cf95fc4291f27f200b63ec6c11d9ebf5a1283f88cf2de7c2eb6e6f76e892ef2
diff --git a/dev-python/paramiko/files/paramiko-2.6.0-tests.patch b/dev-python/paramiko/files/paramiko-2.6.0-tests.patch
new file mode 100644 (file)
index 0000000..4b15f6a
--- /dev/null
@@ -0,0 +1,34 @@
+Skip tests requiring pytest-relaxed since it was removed from the tree due to
+breaking pytest.
+
+--- paramiko-2.6.0/tests/test_client.py
++++ paramiko-2.6.0/tests/test_client.py
+@@ -33,7 +33,7 @@
+ import weakref
+ from tempfile import mkstemp
+-from pytest_relaxed import raises
++#from pytest_relaxed import raises
+ from mock import patch, Mock
+ import paramiko
+@@ -684,7 +684,8 @@
+     # TODO: more granular exception pending #387; should be signaling "no auth
+     # methods available" because no key and no password
+-    @raises(SSHException)
++    #@raises(SSHException)
++    @unittest.skip("skip tests requiring pytest-relaxed")
+     def test_passphrase_kwarg_not_used_for_password_auth(self):
+         # Using the "right" password in the "wrong" field shouldn't work.
+         self._test_connection(passphrase="pygmalion")
+@@ -705,7 +706,8 @@
+             password="television",
+         )
+-    @raises(AuthenticationException)  # TODO: more granular
++    #@raises(AuthenticationException)  # TODO: more granular
++    @unittest.skip("skip tests requiring pytest-relaxed")
+     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
+         self
+     ):
diff --git a/dev-python/paramiko/paramiko-2.6.0.ebuild b/dev-python/paramiko/paramiko-2.6.0.ebuild
new file mode 100644 (file)
index 0000000..eaa0bb5
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="SSH2 protocol library"
+HOMEPAGE="http://www.paramiko.org/ https://github.com/paramiko/paramiko/ https://pypi.org/project/paramiko/"
+# pypi tarballs are missing test data
+#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
+IUSE="doc examples server test"
+
+RDEPEND="
+       >=dev-python/bcrypt-3.1.3[${PYTHON_USEDEP}]
+       >=dev-python/cryptography-2.5[${PYTHON_USEDEP}]
+       >=dev-python/pynacl-1.0.1[${PYTHON_USEDEP}]
+       >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+       test? (
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/pytest[${PYTHON_USEDEP}]
+       )
+"
+
+src_prepare() {
+       eapply "${FILESDIR}"/${P}-tests.patch
+
+       if ! use server; then
+               eapply "${FILESDIR}/${PN}-2.4.2-disable-server.patch"
+       fi
+
+       eapply_user
+}
+
+python_compile_all() {
+       use doc && esetup.py build_sphinx -s sites/docs
+}
+
+python_test() {
+       py.test -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
+
+       distutils-r1_python_install_all
+
+       if use examples; then
+               insinto /usr/share/doc/${PF}/examples
+               doins demos/*
+       fi
+}