Fallback to Pure Python if Compilation fails#76
Merged
Conversation
Originally this code attempted to determine if compiling the C ext would succeed, and if it thought it should, it would then require that the C extension succeed in order to install. This fails in cases where the detection code passes, but compiling ultimately fails (one instance this might happen is if the Python headers are not installed). Instead of "asking permission", this code will now just attempt to compile the module, and will fall back to pure Python if that fails, unless the person has explicitly asked for the C module, in which case it will still just fail.
JordonPhillips
approved these changes
Sep 8, 2017
JordonPhillips
left a comment
There was a problem hiding this comment.
Looks good to me. This is more or less what other libraries do, such as ruamel.yaml.
Contributor
|
Less code is always better :D 👍 |
|
@sigmavirus24 is there going to be a release with these changes? 3.12 was released August 2016 and these changes are from September 2017. I was hoping to take advantage of the update :) |
This was referenced Mar 9, 2021
This was referenced Mar 17, 2021
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.
Originally this code attempted to determine if compiling the C ext
would succeed, and if it thought it should, it would then require that
the C extension succeed in order to install. This fails in cases where
the detection code passes, but compiling ultimately fails (one instance
this might happen is if the Python headers are not installed).
Instead of "asking permission", this code will now just attempt to
compile the module, and will fall back to pure Python if that fails,
unless the person has explicitly asked for the C module, in which case
it will still just fail.