Skip to content

Commit

Permalink
let users specify Cython version
Browse files Browse the repository at this point in the history
  • Loading branch information
mambocab committed Feb 9, 2017
1 parent 797008d commit e821c5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit e821c5e

Please sign in to comment.