Skip to content

Commit 2f9274a

Browse files
authored
Merge pull request apache#696 from mambocab/PYTHON-686
let users specify Cython version
2 parents 115bdbd + e821c5e commit 2f9274a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,11 @@ def run_setup(extensions):
388388
# 1.) build_ext eats errors at compile time, letting the install complete while producing useful feedback
389389
# 2.) there could be a case where the python environment has cython installed but the system doesn't have build tools
390390
if pre_build_check():
391-
kw['setup_requires'] = ['Cython>=0.20,<0.25']
391+
cython_dep = 'Cython>=0.20,<0.25'
392+
user_specified_cython_version = os.environ.get('CASS_DRIVER_ALLOWED_CYTHON_VERSION')
393+
if user_specified_cython_version is not None:
394+
cython_dep = 'Cython==%s' % (user_specified_cython_version,)
395+
kw['setup_requires'] = [cython_dep]
392396
else:
393397
sys.stderr.write("Bypassing Cython setup requirement\n")
394398

0 commit comments

Comments
 (0)