Skip to content

Commit

Permalink
Attempt for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jul 17, 2022
1 parent 52a8355 commit fbe1597
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
- {VERSION: "3.10", TOXENV: "flake"}
- {VERSION: "3.10", TOXENV: "rust"}
- {VERSION: "3.10", TOXENV: "docs", OPENSSL: {TYPE: "openssl", VERSION: "3.0.5"}}
- {VERSION: "pypy-3.7", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.8", TOXENV: "pypy3-nocoverage"}
- {VERSION: "pypy-3.9", TOXENV: "pypy3-nocoverage"}
- {VERSION: "3.10", TOXENV: "py310", OPENSSL: {TYPE: "openssl", VERSION: "1.1.0l"}}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/wheel-builder.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 fbe1597

Please sign in to comment.