Skip to content

Commit

Permalink
support compiled PyPy cffi extensions, fixes #93
Browse files Browse the repository at this point in the history
  • Loading branch information
daa committed May 23, 2018
1 parent 5b8b569 commit 1b39611
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auditwheel/elfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ def elf_references_PyFPE_jbuf(elf: ELFFile) -> bool:

def elf_is_python_extension(fn, elf) -> Tuple[bool, Optional[int]]:
modname = basename(fn).split('.', 1)[0]
module_init_f = {'init' + modname: 2, 'PyInit_' + modname: 3}
module_init_f = {
'init' + modname: 2,
'PyInit_' + modname: 3,
'_cffi_pypyinit_' + modname: 2,
}

sect = elf.get_section_by_name('.dynsym')
if sect is None:
Expand Down
Binary file not shown.
9 changes: 9 additions & 0 deletions tests/test_bundled_pypy_snappy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from auditwheel.wheel_abi import analyze_wheel_abi


def test_analyze_wheel_abi_pypy_cffi():
winfo = analyze_wheel_abi(
'tests/python_snappy-0.5.2-pp260-pypy_41-linux_x86_64.whl')
external_libs = winfo.external_refs['manylinux1_x86_64']['libs']
assert len(external_libs) > 0
assert set(external_libs) == {'libsnappy.so.1'}

0 comments on commit 1b39611

Please sign in to comment.