From 1516c003bfb08c846c074cbe81f669abfd6e7914 Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald@stufft.io> Date: Sat, 5 Oct 2013 19:36:54 -0400 Subject: [PATCH] Revert "Remove the CFFI compile_module monkey patch" This reverts commit 8511afd99162cafe3cffbde4bdcccf8ab22eb911. --- nacl/nacl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nacl/nacl.py b/nacl/nacl.py index c35916cb..2663a002 100644 --- a/nacl/nacl.py +++ b/nacl/nacl.py @@ -148,6 +148,12 @@ class Library(object): self._ffi = ffi self._initalized = False + # This prevents the compile_module() from being called, the module + # should have been compiled by setup.py + def _compile_module(*args, **kwargs): + raise RuntimeError("Cannot compile module during runtime") + self._ffi.verifier.compile_module = _compile_module + def __getattr__(self, name): if not self._initalized: self._lib = self._ffi.verifier.load_library() -- GitLab