From a7ee2cd4d0a0c12462e5187301588596aa4c901a Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 29 Sep 2020 21:56:37 +0100 Subject: [PATCH] cryptography libpthread patch --- recipes/cryptography/__init__.py | 1 + recipes/cryptography/libpthread.patch | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 recipes/cryptography/libpthread.patch diff --git a/recipes/cryptography/__init__.py b/recipes/cryptography/__init__.py index 9a81b26..fd38799 100644 --- a/recipes/cryptography/__init__.py +++ b/recipes/cryptography/__init__.py @@ -8,6 +8,7 @@ class CryptographyRecipe(CompiledComponentsPythonRecipe): url = 'https://github.com/pyca/cryptography/archive/{version}.tar.gz' depends = [('python2', 'python3crystax'), 'openssl', 'idna', 'pyasn1', 'six', 'setuptools', 'ipaddress', 'cffi'] call_hostpython_via_targetpython = False + patches = ['libpthread.patch'] def get_recipe_env(self, arch): env = super(CryptographyRecipe, self).get_recipe_env(arch) diff --git a/recipes/cryptography/libpthread.patch b/recipes/cryptography/libpthread.patch new file mode 100644 index 0000000..dcdedd8 --- /dev/null +++ b/recipes/cryptography/libpthread.patch @@ -0,0 +1,16 @@ +diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py +index 35ccd6b..6d5ee4c 100755 +--- a/src/_cffi_src/build_openssl.py ++++ b/src/_cffi_src/build_openssl.py +@@ -42,10 +42,7 @@ def _get_openssl_libraries(platform): + # -lpthread required due to usage of pthread an potential + # existance of a static part containing e.g. pthread_atfork + # (https://github.com/pyca/cryptography/issues/5084) +- if sys.platform == "zos": +- return ["ssl", "crypto"] +- else: +- return ["ssl", "crypto", "pthread"] ++ return ["ssl", "crypto"] + + + def _extra_compile_args(platform):