How to use the cffi.verifier.cleanup_tmpdir function in cffi

To help you get started, we’ve selected a few cffi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github holzschu / python3_ios / extraPackages / cffi-1.11.5 / testing / cffi0 / test_verify.py View on Github external
def setup_module():
    import cffi.verifier
    cffi.verifier.cleanup_tmpdir()
    #
    # check that no $ sign is produced in the C file; it used to be the
    # case that anonymous enums would produce '$enum_$1', which was
    # used as part of a function name.  GCC accepts such names, but it's
    # apparently non-standard.
    _r_comment = re.compile(r"/\*.*?\*/|//.*?$", re.DOTALL | re.MULTILINE)
    _r_string = re.compile(r'\".*?\"')
    def _write_source_and_check(self, file=None):
        base_write_source(self, file)
        if file is None:
            f = open(self.sourcefilename)
            data = f.read()
            f.close()
            data = _r_comment.sub(' ', data)
            data = _r_string.sub('"skipped"', data)
            assert '$' not in data
github holzschu / python3_ios / extraPackages / cffi-1.11.5 / testing / cffi0 / test_verify2.py View on Github external
def setup_module():
    import cffi.verifier
    cffi.verifier.cleanup_tmpdir(keep_so=True)
github holzschu / python3_ios / extraPackages / cffi-1.11.5 / testing / cffi0 / test_vgen2.py View on Github external
def setup_module():
    cffi.verifier.cleanup_tmpdir(keep_so=True)
    cffi.verifier._FORCE_GENERIC_ENGINE = True
github holzschu / python3_ios / extraPackages / cffi-1.11.5 / testing / cffi0 / test_vgen.py View on Github external
def setup_module():
    cffi.verifier.cleanup_tmpdir()
    cffi.verifier._FORCE_GENERIC_ENGINE = True
    # Runs all tests with _FORCE_GENERIC_ENGINE = True, to make sure we
github veegee / guv / pyuv_cffi / __init__.py View on Github external
"""pyuv_cffi - an implementation of pyuv via CFFI

Compatible with CPython 3 and pypy3
"""
import os
import functools

import cffi
import cffi.verifier
from cffi import VerificationError

__version__ = '0.1.0'
version_info = tuple(map(int, __version__.split('.')))

# clean up old compiled library binaries (not needed in production?)
cffi.verifier.cleanup_tmpdir()

thisdir = os.path.dirname(os.path.realpath(__file__))

# load FFI definitions and custom C code
ffi = cffi.FFI()
with open(os.path.join(thisdir, 'pyuv_cffi_cdef.c')) as f:
    ffi.cdef(f.read())

try:
    with open(os.path.join(thisdir, 'pyuv_cffi.c')) as f:
        libuv = ffi.verify(f.read(), libraries=['uv'])
except VerificationError as e:
    print(e)
    exit(1)

UV_READABLE = libuv.UV_READABLE
github regehr / solid_code_class / fuzzer / keith-richards / fuzz.py View on Github external
    @staticmethod
    def clean():
        cffi.verifier.cleanup_tmpdir()