mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
add library switch for windows support
Temporarily using pragma: no cover on it until we have windows coverage on travis. Windows builds will be done via jenkins for now.
This commit is contained in:
parent
46ffbfb98d
commit
f84ca678b1
2 changed files with 10 additions and 1 deletions
|
|
@ -3,5 +3,6 @@ branch = True
|
|||
|
||||
[report]
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
@abc.abstractmethod
|
||||
@abc.abstractproperty
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import sys
|
||||
|
||||
from cryptography.hazmat.bindings.utils import build_ffi
|
||||
|
||||
|
||||
|
|
@ -79,9 +81,15 @@ class Binding(object):
|
|||
if cls.ffi is not None and cls.lib is not None:
|
||||
return
|
||||
|
||||
# platform check to set the right library names
|
||||
if sys.platform != "win32":
|
||||
libraries = ["crypto", "ssl"]
|
||||
else: # pragma: no cover
|
||||
libraries = ["libeay32", "ssleay32", "advapi32"]
|
||||
|
||||
cls.ffi, cls.lib = build_ffi(cls._module_prefix, cls._modules,
|
||||
_OSX_PRE_INCLUDE, _OSX_POST_INCLUDE,
|
||||
["crypto", "ssl"])
|
||||
libraries)
|
||||
|
||||
@classmethod
|
||||
def is_available(cls):
|
||||
|
|
|
|||
Loading…
Reference in a new issue