Make sure >3 Python version triggers a failure

pull/23437/head
Lidi Zheng 5 years ago
parent 27033c4f8d
commit 8f3bd10c03
  1. 7
      src/python/grpcio/support.py

@ -37,7 +37,12 @@ Could not find <Python.h>. This could mean the following:
* You're on Windows and your Python installation was somehow corrupted
(check your environment variables or try re-installing?)
"""
PYTHON_REPRESENTATION = 'python' if sys.version_info[0] == 2 else 'python3'
if sys.version_info[0] == 2:
PYTHON_REPRESENTATION = 'python'
elif sys.version_info[0] == 3:
PYTHON_REPRESENTATION = 'python3'
else:
raise NotImplementedError('Unsupported Python version: %s' % sys.version)
C_CHECKS = {
C_PYTHON_DEV:

Loading…
Cancel
Save