-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for compiled cffi pypy extensions, fixes #93 #94
Added support for compiled cffi pypy extensions, fixes #93 #94
Conversation
module_init_f = { | ||
'init' + modname: 2, | ||
'PyInit_' + modname: 3, | ||
'_cffi_pypyinit_' + modname: 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are 2 and 3 in this context? We might want to change these to named constants for legibility :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are versions of Python used to determine if extension may use ucs-2 functions. Corresponding code is in auditwheel.wheel_abi.get_wheel_elfdata
. In case of CPython those numbers are really Python version but in case if pypy cffi python version cannot be derived from the name of module init function so I left 2 there.
@@ -113,7 +113,8 @@ def copylib(src_path, dest_dir): | |||
with open(src_path, 'rb') as f: | |||
shorthash = hashfile(f)[:8] | |||
|
|||
base, ext = os.path.basename(src_path).split('.', 1) | |||
src_name = os.path.basename(src_path) | |||
base, ext = src_name.split('.', 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, this is a 2-for-1 to fix #91. Got it.
- Remove libpanel and libncurses from the lib_whitelist (pypa#94) - Generate symbol_versions - Bump priority to 200.
- Remove libpanel and libncurses from the lib_whitelist (#94) - Generate symbol_versions - Bump priority to 200.
As said in corresponding issue CFFI extensions compiled for PyPy export
'_cffi_pypyinit_' + modname
symbol instead of usual Python module init functions, this pull request adds support for such wheels. Also by the way it fixes undefined variable mentioned in #91.