Check to see if a binding is available before trying to install it
diff --git a/setup.py b/setup.py
index 0bdad48..514fdab 100644
--- a/setup.py
+++ b/setup.py
@@ -47,10 +47,12 @@
from cryptography.hazmat.primitives import constant_time, padding
self.distribution.ext_modules = [
- Binding().ffi.verifier.get_extension(),
constant_time._ffi.verifier.get_extension(),
padding._ffi.verifier.get_extension()
]
+ if Binding.is_available():
+ self.distribution.ext_modules.append(Binding().ffi.verifier.get_extension())
+
build.finalize_options(self)