From 156360af3d10fa4ecfb1ada6718f3ae57db5e62b Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 30 Jun 2014 12:14:01 -0600 Subject: switch to static linking on windows and update installation page --- cryptography/hazmat/bindings/openssl/binding.py | 4 ++++ docs/installation.rst | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/cryptography/hazmat/bindings/openssl/binding.py b/cryptography/hazmat/bindings/openssl/binding.py index 554c3c3e..48d7f9bb 100644 --- a/cryptography/hazmat/bindings/openssl/binding.py +++ b/cryptography/hazmat/bindings/openssl/binding.py @@ -98,6 +98,10 @@ class Binding(object): libraries = ["crypto", "ssl"] else: # pragma: no cover libraries = ["libeay32", "ssleay32", "advapi32"] + libraries = [ + "libeay32mt", "ssleay32mt", "advapi32", + "crypt32", "gdi32", "user32", "ws2_32" + ] cls.ffi, cls.lib = build_ffi( module_prefix=cls._module_prefix, diff --git a/docs/installation.rst b/docs/installation.rst index 8fbbcb30..56d21e72 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -35,16 +35,23 @@ OpenSSL releases: On Windows ---------- -If you're on Windows you'll need to make sure you have OpenSSL installed. -There are `pre-compiled binaries`_ available. If your installation is in -an unusual location set the ``LIB`` and ``INCLUDE`` environment variables -to include the corresponding locations. For example: +The wheel package on Windows is a statically linked build (as of 0.5) so all +dependencies are included. Just run + +.. code-block:: console + + $ pip install cryptography + +If you prefer to compile it yourself you'll need to have OpenSSL installed. +There are `pre-compiled binaries`_ available. If your installation is in an +unusual location set the ``LIB`` and ``INCLUDE`` environment variables to +include the corresponding locations. For example: .. code-block:: console C:\> \path\to\vcvarsall.bat x86_amd64 - C:\> set LIB=C:\OpenSSL-1.0.1g-64bit\lib;%LIB% - C:\> set INCLUDE=C:\OpenSSL-1.0.1g-64bit\include;%INCLUDE% + C:\> set LIB=C:\OpenSSL-1.0.1h-64bit\lib\VC\static;%LIB% + C:\> set INCLUDE=C:\OpenSSL-1.0.1h-64bit\include;%INCLUDE% C:\> pip install cryptography Building cryptography on Linux -- cgit v1.2.3