From e821c5e7a6ed0bc9e8cec1f248401b4727bc809e Mon Sep 17 00:00:00 2001 From: Jim Witschey Date: Mon, 23 Jan 2017 12:27:58 -0500 Subject: [PATCH] let users specify Cython version --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 95f046ad..0540478b 100644 --- a/setup.py +++ b/setup.py @@ -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")