Skip to content

Commit a511116

Browse files
committed
Fix tests/3-pythonscript-cython-only compilation when clang is not available
1 parent d97da69 commit a511116

File tree

1 file changed

+3
-0
lines changed
  • tests/3-pythonscript-cython-only

1 file changed

+3
-0
lines changed

tests/3-pythonscript-cython-only/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import platform
23
from setuptools import setup
34
from Cython.Build import cythonize
@@ -20,6 +21,8 @@
2021
python_include_dir = next(Path(".").parent.glob("addons/pythonscript/*-*/include"))
2122
else:
2223
raise RuntimeError(f"Unsupported platform `{platform.system()}`")
24+
# Same idea: `sysconfig` defines CC=clang, but who knows if the current machine has it !
25+
os.environ.setdefault("CC", "cc")
2326

2427

2528
# Work around cythonize's `include_path` parameter not configuring the C compiler

0 commit comments

Comments
 (0)