Skip to content
Snippets Groups Projects
Commit 5a015cb5 authored by Donald Stufft's avatar Donald Stufft
Browse files

Work around cffi suffix issue

parent 5a586861
Branches
Tags
No related merge requests found
......@@ -7,13 +7,24 @@ from __future__ import division
import functools
import os.path
from distutils.sysconfig import get_config_vars
import cffi.verifier
from cffi import FFI
from cffi.verifier import Verifier
__all__ = ["ffi", "lib"]
# Monkeypatch cffi.verifier._get_so_suffix to return the same as distutils
# See: https://bitbucket.org/cffi/cffi/issue/110/
def _get_so_suffix():
return get_config_vars().get("EXT_SUFFIX", ".so")
cffi.verifier._get_so_suffix = _get_so_suffix
ffi = FFI()
ffi.cdef(
# Secret Key Encryption
......@@ -76,7 +87,7 @@ ffi.cdef(
)
ffi.verifier = Verifier(ffi,
ffi.verifier = cffi.verifier.Verifier(ffi,
"#include <sodium.h>",
# We need to link to the sodium library
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment