+1.


On Mon, Mar 17, 2014 at 11:18 AM, David Reid <notifications@github.com>wrote:

> In cryptography/hazmat/bindings/utils.py:
>
> > +
> > +def _create_modulename(ffi, source, sys_version):
> > +    """
> > +    cffi creates a modulename internally that incorporates the cffi version.
> > +    This will cause cryptography's wheels to break when the version of cffi
> > +    the user has does not match what was used when building the wheel. To
> > +    resolve this we build our own modulename that uses most of the same code
> > +    from cffi but elides the version key.
> > +    """
> > +    key = '\x00'.join([sys_version[:3], source] + ffi._cdefsources)
> > +    key = key.encode('utf-8')
> > +    k1 = hex(binascii.crc32(key[0::2]) & 0xffffffff)
> > +    k1 = k1.lstrip('0x').rstrip('L')
> > +    k2 = hex(binascii.crc32(key[1::2]) & 0xffffffff)
> > +    k2 = k2.lstrip('0').rstrip('L')
> > +    return '_cffi_{0}{1}'.format(k1, k2)
>
> It might make sense to make the file on disk visually distinguishable from
> what would be created by cffi normally.
>
> _Cryptography_cffi_{0}{1} maybe?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/768/files#r10670456>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084