Skip to content

Commit

Permalink
Attempt for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jun 19, 2022
1 parent 504caf1 commit 1582d33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -27,9 +27,8 @@ jobs:
- {VERSION: "3.10", TOXENV: "flake"}
- {VERSION: "3.10", TOXENV: "rust"}
- {VERSION: "3.10", TOXENV: "docs", OPENSSL: {TYPE: "openssl", VERSION: "3.0.3"}}
- {VERSION: "pypy-3.7", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.8", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.9", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.8-nightly", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.9-nightly", TOXENV: "pypy3-nocoverage"}
- {VERSION: "3.10", TOXENV: "py310", OPENSSL: {TYPE: "openssl", VERSION: "1.1.0l"}}
- {VERSION: "3.10", TOXENV: "py310", OPENSSL: {TYPE: "openssl", VERSION: "1.1.1o"}}
- {VERSION: "3.10", TOXENV: "py310-ssh", OPENSSL: {TYPE: "openssl", VERSION: "1.1.1o"}}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/wheel-builder.yml
Expand Up @@ -24,7 +24,6 @@ jobs:
matrix:
PYTHON:
- { VERSION: "cp36-cp36m", PATH: "/opt/python/cp36-cp36m/bin/python", ABI_VERSION: 'cp36' }
- { VERSION: "pypy3.7", PATH: "/opt/pypy3.7/bin/pypy" }
- { VERSION: "pypy3.8", PATH: "/opt/pypy3.8/bin/pypy" }
- { VERSION: "pypy3.9", PATH: "/opt/pypy3.9/bin/pypy" }
MANYLINUX:
Expand All @@ -34,8 +33,6 @@ jobs:
- { name: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64"}
exclude:
# There are no readily available musllinux PyPy distributions
- PYTHON: { VERSION: "pypy3.7", PATH: "/opt/pypy3.7/bin/pypy" }
MANYLINUX: { name: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64" }
- PYTHON: { VERSION: "pypy3.8", PATH: "/opt/pypy3.8/bin/pypy" }
MANYLINUX: { name: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64"}
- PYTHON: { VERSION: "pypy3.9", PATH: "/opt/pypy3.9/bin/pypy" }
Expand Down
8 changes: 7 additions & 1 deletion src/_cffi_src/utils.py
Expand Up @@ -75,7 +75,13 @@ def build_ffi(
if platform.python_implementation() == "PyPy":
verify_source += r"""
int Cryptography_make_openssl_module(void) {
return cffi_start_python();
int result;
Py_BEGIN_ALLOW_THREADS
result = cffi_start_python();
Py_END_ALLOW_THREADS
return result;
}
"""
ffi.cdef(cdef_source)
Expand Down

0 comments on commit 1582d33

Please sign in to comment.