Use get_ext_fullpath in ffiplatform._build - #283
Merged
Merged
Conversation
get_outputs() returns every output the build_ext command produced, not just the one we asked it to build. When the Distribution/build_ext state ends up carrying more than one extension (as reported in python-cffi#246, where the caller's own project already has other native extensions registered), the unconditional [soname] = cmd_obj.get_outputs() unpacking crashes with a bare ValueError instead of naming the extension we actually wanted. get_ext_fullpath(ext.name) asks build_ext directly for the path of the specific extension we passed in, so it no longer depends on exactly one output existing. This also gives a clearer failure mode for python-cffi#229, where a beginner hit the same unpacking crash with no way to tell what went wrong.
Simpler, and drops the now-unneeded binascii import.
Contributor
Author
|
Thanks @afonsojanu sorry it took so long |
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.
Continuation of #273 which was closed before merging