Skip to content

Commit e9f6239

Browse files
committed
workaround setuptools bug coercing .pyx to .c
old setuptools will incorrectly coerce cython sources to .c if pyrex is not importable.
1 parent be9aa09 commit e9f6239

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,9 @@ def run(self):
803803
sources = sources,
804804
**COMPILER_SETTINGS
805805
)
806+
if suffix == '.pyx' and ext.sources[0].endswith('.c'):
807+
# undo setuptools stupidly clobbering cython sources:
808+
ext.sources = sources
806809
extensions.append(ext)
807810

808811

0 commit comments

Comments
 (0)