cffi uses inconsistent suffixes
Created originally on Bitbucket by dstufft (Donald Stufft)
So I have my Verifier instance monkeypatched to prevent any runtime compilation at all. I noticed that this was failing with Python3.x. After digging into it more It's because the methods used by the Verifier is inconsistent with the method used by distutils.
Distutils uses distutls.sysconfig.get_config_var("EXT_SUFFIX")
which returns ".so"
, however the Verifier()
instance uses cffi.verifier._get_so_suffix()
which returns ".cpython-33m.so"
. Under the hood cffi.verifier._get_so_suffix()
uses imp.get_suffixes()
.
I believe that either cffi should be smart enough to check all of the possible imp.C_EXTENSION
suffixes from imp.get_suffixes()
or it should use the same means that distutils does to determine what the suffix should be.
distutils code here: https://github.com/python/cpython/blob/ea8fbb22efc32476fca81af70d937d907b677a77/Lib/distutils/command/build_ext.py#L668-L670