let users specify Cython version#696
Merged
Merged
Conversation
aboudreault
reviewed
Jan 24, 2017
| user_specified_cython_version = os.environ.get('CASS_DRIVER_ALLOWED_CYTHON_VERSION') | ||
| kw['setup_requires'] = ['Cython>=0.20,<0.25' if | ||
| user_specified_cython_version is None else | ||
| 'Cython=={}'.format(user_specified_cython_version)] |
Contributor
There was a problem hiding this comment.
for clarity if we need to add more deps in the future. I would do something like:
cython_dep = 'Cython>=0.20,<0.25'
user_specified_cython_version = os.environ.get('CASS_DRIVER_ALLOWED_CYTHON_VERSION')
if user_specified_cython_version:
cython_dep = 'Cython==%s' % user_specified_cython_version
kw['setup_requires'] = [cython_dep]Note that In the whole code base, we use the old style formatting ('%s' % 'hello'), so better to stick to that here as well.
Contributor
Author
|
Thanks for the review! I've addressed your comments; if they look good to you I'll squash and merge. |
Contributor
|
+1 |
Contributor
Author
|
Thanks, merging 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
CASS_DRIVER_ALLOWED_CYTHON_VERSION"escape hatch" env var that allows users to specify what version of Cython to use.You can verify this behavior by installing the driver in an environment without Cython installed, then opening the installed driver with
and searching for
cython. If you install withoutCASS_DRIVER_ALLOWED_CYTHON_VERSION, the driver is installed with0.24.1. If you install withCASS_DRIVER_ALLOWED_CYTHON_VERSION=0.25.2, the driver is installed with0.25.2. (This holds even when you've installedCython==0.25.2in the environment you're installing the driver.)