aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-01-02 13:09:34 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-01-02 13:09:34 -0800
commit9a00f0539d5ab9b03b84625791663f11d7bed75c (patch)
tree12aa3fc581afd8d8185856fdcc092214300c6cc7 /setup.py
parentc39559c6d629d68674d240d6e6bcdf44a15d90cf (diff)
downloadcryptography-9a00f0539d5ab9b03b84625791663f11d7bed75c.tar.gz
cryptography-9a00f0539d5ab9b03b84625791663f11d7bed75c.tar.bz2
cryptography-9a00f0539d5ab9b03b84625791663f11d7bed75c.zip
All the necessary things for setup.py to build cffi stuff
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 1856cadb..0776ba6e 100644
--- a/setup.py
+++ b/setup.py
@@ -10,6 +10,8 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from distutils.command.build import build
+
from setuptools import setup, find_packages
@@ -30,6 +32,20 @@ setup_requires = [
CFFI_DEPENDENCY,
]
+
+class cffi_build(build):
+ def finalize_options(self):
+ from cryptography.hazmat.bindings.openssl.binding import Binding
+ 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()
+ ]
+ build.finalize_options(self)
+
+
setup(
name=about["__title__"],
version=about["__version__"],
@@ -70,4 +86,8 @@ setup(
# for cffi
zip_safe=False,
+ ext_package="cryptography",
+ cmdclass={
+ "build": cffi_build,
+ }
)