diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2020-03-15 10:01:38 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2020-03-15 10:01:38 +0100 |
commit | 4be2560e01ed40e256b5143c8b4f5de2450ffefd (patch) | |
tree | 296d1332ef1a53ab03d31c31ee2aa52bcef92353 /tests/smbserver.py | |
parent | 67f3f6cff19ed323849280316c592969ab97ee21 (diff) | |
download | curl-4be2560e01ed40e256b5143c8b4f5de2450ffefd.tar.gz |
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
Diffstat (limited to 'tests/smbserver.py')
-rwxr-xr-x | tests/smbserver.py | 10 |
1 files changed, 7 insertions, 3 deletions
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, |