let users specify Cython version

This commit is contained in:
Jim Witschey
2017-01-23 12:27:58 -05:00
parent 797008d83b
commit e821c5e7a6

View File

@@ -388,7 +388,11 @@ def run_setup(extensions):
# 1.) build_ext eats errors at compile time, letting the install complete while producing useful feedback
# 2.) there could be a case where the python environment has cython installed but the system doesn't have build tools
if pre_build_check():
kw['setup_requires'] = ['Cython>=0.20,<0.25']
cython_dep = 'Cython>=0.20,<0.25'
user_specified_cython_version = os.environ.get('CASS_DRIVER_ALLOWED_CYTHON_VERSION')
if user_specified_cython_version is not None:
cython_dep = 'Cython==%s' % (user_specified_cython_version,)
kw['setup_requires'] = [cython_dep]
else:
sys.stderr.write("Bypassing Cython setup requirement\n")