net-proxy/sshuttle: check for more generic remote python versions
authorTim Harder <radhermit@gentoo.org>
Tue, 6 Feb 2018 03:15:57 +0000 (22:15 -0500)
committerTim Harder <radhermit@gentoo.org>
Tue, 6 Feb 2018 03:17:58 +0000 (22:17 -0500)
net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch [new file with mode: 0644]
net-proxy/sshuttle/sshuttle-0.78.3-r1.ebuild

diff --git a/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch b/net-proxy/sshuttle/files/sshuttle-0.78.3-remote-python.patch
new file mode 100644 (file)
index 0000000..d7404fd
--- /dev/null
@@ -0,0 +1,13 @@
+Check for more generic remote python versions.
+
+--- sshuttle-0.78.3/sshuttle/ssh.py
++++ sshuttle-0.78.3/sshuttle/ssh.py
+@@ -116,7 +116,7 @@
+         if python:
+             pycmd = "'%s' -c '%s'" % (python, pyscript)
+         else:
+-            pycmd = ("P=python3.5; $P -V 2>/dev/null || P=python; "
++            pycmd = ("P=python3; $P -V 2>/dev/null || P=python2; $P -V 2>/dev/null || P=python; "
+                      "exec \"$P\" -c %s") % quote(pyscript)
+             pycmd = ("exec /bin/sh -c %s" % quote(pycmd))
+         argv = (sshl +
index 49502d961803c2d64eaa202e4c4eb4934b7c3b7d..254601915e1c7f62c0ea0f87953b25f9e309dead 100644 (file)
@@ -31,6 +31,8 @@ DEPEND="
 
 CONFIG_CHECK="~NETFILTER_XT_TARGET_HL ~IP_NF_TARGET_REDIRECT ~IP_NF_MATCH_TTL ~NF_NAT"
 
+PATCHES=( "${FILESDIR}"/${P}-remote-python.patch )
+
 python_prepare_all() {
        # don't run tests via setup.py pytest
        sed -i "/setup_requires=/s/'pytest-runner'//" setup.py || die