From 60d3f709eb96ba5df9bdfede5c024c1f2db9f0e5 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 28 Mar 2023 22:11:23 -0400 Subject: [PATCH] Error cleanly in setup.py when using a too-old PyPy (#8634) --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index b3a7cf9b2..b05dc2f12 100644 --- a/setup.py +++ b/setup.py @@ -43,6 +43,9 @@ src_dir = os.path.join(base_dir, "src") # means that we need to add the src/ directory to the sys.path. sys.path.insert(0, src_dir) +if hasattr(sys, "pypy_version_info") and sys.pypy_version_info < (7, 3, 10): + raise RuntimeError("cryptography is not compatible with PyPy3 < 7.3.10") + try: # See pyproject.toml for most of the config metadata. setup(