diff --git a/python-cryptography-1.5.2-fix_available_backends.patch b/python-cryptography-1.5.2-fix_available_backends.patch new file mode 100644 index 0000000..bde50ba --- /dev/null +++ b/python-cryptography-1.5.2-fix_available_backends.patch @@ -0,0 +1,26 @@ +--- cryptography-1.5.2/src/cryptography/hazmat/backends/__init__.py.orig 2016-10-17 12:23:32.705257213 +0200 ++++ cryptography-1.5.2/src/cryptography/hazmat/backends/__init__.py 2016-10-17 12:23:48.238260931 +0200 +@@ -29,6 +29,23 @@ + ) + ] + ++ if _available_backends_list is None or len(_available_backends_list) == 0: ++ # backend 1 ++ try: ++ from cryptography.hazmat.backends.commoncrypto.backend import backend as be_cc ++ except ImportError: ++ be_cc = None ++ # backend 2 ++ try: ++ from cryptography.hazmat.backends.openssl.backend import backend as be_ossl ++ except ImportError: ++ be_ossl = None ++ # add any backends of your own ++ ++ _available_backends_list = [ ++ be for be in (be_cc, be_ossl) if be is not None ++ ] ++ + return _available_backends_list + + _default_backend = None diff --git a/python-cryptography.spec b/python-cryptography.spec index d2ea528..bd2613c 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,6 +1,6 @@ Name: python-cryptography Version: 1.5.2 -Release: 1mamba +Release: 2mamba Summary: Cryptographic recipes and primitives to Python developers Group: System/Libraries Vendor: openmamba @@ -8,6 +8,7 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/pyca/cryptography Source: https://pypi.debian.net/cryptography/cryptography-%{version}.tar.gz +Patch0: python-cryptography-1.5.2-fix_available_backends.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -27,6 +28,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root %prep %setup -q -n cryptography-%{version} +%patch0 -p1 %build CFLAGS="%{optflags}" %{__python} setup.py build @@ -47,6 +49,9 @@ CFLAGS="%{optflags}" %{__python} setup.py build %doc LICENSE %changelog +* Mon Oct 17 2016 Silvan Calarco 1.5.2-2mamba +- patched to fix no _available_backends problem (see http://stackoverflow.com/questions/38277915/python-cryptography-multibackend-cannot-be-innitialized#38285941) + * Tue Sep 27 2016 Automatic Build System 1.5.2-1mamba - automatic version update by autodist