Skip to content

Commit

Permalink
cryptography libpthread patch
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Sep 29, 2020
1 parent 6d058ce commit a7ee2cd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipes/cryptography/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions recipes/cryptography/libpthread.patch
Original file line number Diff line number Diff line change
@@ -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):

0 comments on commit a7ee2cd

Please sign in to comment.