From 4be2560e01ed40e256b5143c8b4f5de2450ffefd Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sun, 15 Mar 2020 10:01:38 +0100 Subject: tests: remove python_dependencies for smbserver from our tree Users of the SMB tests will have to install impacket manually. Reasoning: our in-tree version of impacket was quite outdated and only compatible with Python 2 which is already end-of-life. Upgrading to Python 3 and a compatible impacket version would require to import additional Python-only and CPython-extension dependencies. This would have hindered portability enormously. Closes #5094 --- tests/smbserver.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/smbserver.py') diff --git a/tests/smbserver.py b/tests/smbserver.py index 4152bb6c5..d7abf8d47 100755 --- a/tests/smbserver.py +++ b/tests/smbserver.py @@ -36,9 +36,13 @@ else: # Import our curl test data helper import curl_test_data -# This saves us having to set up the PYTHONPATH explicitly -deps_dir = os.path.join(os.path.dirname(__file__), "python_dependencies") -sys.path.append(deps_dir) +# impacket needs to be installed in the Python environment +try: + import impacket +except ImportError: + sys.stderr.write('Python package impacket needs to be installed!\n') + sys.stderr.write('Use pip or your package manager to install it.\n') + sys.exit(1) from impacket import smbserver as imp_smbserver from impacket import smb as imp_smb from impacket.nt_errors import (STATUS_ACCESS_DENIED, STATUS_SUCCESS, -- cgit v1.2.1