diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-19 23:44:31 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-19 23:44:31 -0600 |
commit | defc7f0534914db1b72ad5dfa0250f4fabc3184a (patch) | |
tree | c1ac99f2b6a33c89b19d44cc759ba26f52645f5f /setup.py | |
parent | 5f60acba1ed893cc746aab3b8a653abfcef92b41 (diff) | |
download | cryptography-defc7f0534914db1b72ad5dfa0250f4fabc3184a.tar.gz cryptography-defc7f0534914db1b72ad5dfa0250f4fabc3184a.tar.bz2 cryptography-defc7f0534914db1b72ad5dfa0250f4fabc3184a.zip |
On OS X at build time compile the CC bindings
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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) |