From defc7f0534914db1b72ad5dfa0250f4fabc3184a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 19 Jan 2014 23:44:31 -0600 Subject: On OS X at build time compile the CC bindings --- setup.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e8bcc11f..57a95752 100644 --- a/setup.py +++ b/setup.py @@ -43,14 +43,23 @@ class cffi_build(build): """ def finalize_options(self): - from cryptography.hazmat.bindings.openssl.binding import Binding + from cryptography.hazmat.bindings.commoncrypto.binding import ( + Binding as CommonCryptoBinding + ) + from cryptography.hazmat.bindings.openssl.binding import ( + Binding as OpenSSLBinding + ) from cryptography.hazmat.primitives import constant_time, padding self.distribution.ext_modules = [ - Binding().ffi.verifier.get_extension(), + OpenSSLBinding().ffi.verifier.get_extension(), constant_time._ffi.verifier.get_extension(), padding._ffi.verifier.get_extension() ] + if CommonCryptoBinding.is_available(): + self.distribution.ext_modules.append( + CommonCryptoBinding().ffi.verifier.get_extension() + ) build.finalize_options(self) -- cgit v1.2.3