Skip to content

Commit 2f8bed2

Browse files
committed
Make sure the C ext is not build on PyPy (if it builds it would segfault and be broken)
1 parent f633fd3 commit 2f8bed2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import platform
44
import re
5+
import sys
56
from pathlib import Path
67

78
from setuptools import Extension
@@ -28,6 +29,8 @@ class OptionalBuildExt(build_ext):
2829

2930
def run(self):
3031
try:
32+
if '__pypy__' in sys.builtin_module_names:
33+
raise Exception('C extensions are broken on PyPy!')
3134
if os.environ.get('SETUPPY_FORCE_PURE'):
3235
raise Exception('C extensions disabled (SETUPPY_FORCE_PURE)!')
3336
super().run()

0 commit comments

Comments
 (0)