Skip to content

Commit 5507ddd

Browse files
author
Panos
committed
Added windows py2 check
1 parent 8d11855 commit 5507ddd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
ON_WINDOWS = platform.system() == 'Windows'
2323
SYSTEM_LIBSSH = bool(os.environ.get('SYSTEM_LIBSSH', 0))
2424

25+
if ON_WINDOWS and _PYTHON_MAJOR_VERSION < 3:
26+
raise ImportError(
27+
"ssh-python requires Python 3 or above on Windows platforms.")
28+
2529
# Only build libssh if running a build
2630
if (len(sys.argv) >= 2 and not (
2731
'--help' in sys.argv[1:] or

0 commit comments

Comments
 (0)