components/python/paramiko/patches/03-system-test.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 20 Oct 2016 23:00:49 -0700
changeset 7144 75dd46f584db
parent 6685 bac278bb0da8
permissions -rw-r--r--
Added tag s12-111 for changeset bc980fed463e

#
# Support system-test target.
# 
# This patch hacks sys.path in test.py to avoid importing paramiko
# module from $(SOURCE) directory, but instead import it from PYTHONPATH.
#
# Patch source: in-house
# Solaris specific, not suitable for upstream contribution.
#
--- old/test.py
+++ new/test.py
@@ -27,7 +27,11 @@ import re
 import sys
 import unittest
 from optparse import OptionParser
+
+# to support system-test target, honor PYTHONPATH for paramiko import
+curdir = sys.path.pop(0)
 import paramiko
+sys.path.insert(0, curdir)
 import threading
 from paramiko.py3compat import PY2