Skip to content

Commit

Permalink
non-cython-mode: Check if should use cpp files instead of c
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 committed Feb 11, 2024
1 parent a0f3ee2 commit 4cd2bd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,12 @@ def get_extensions_from_sources(sources):
c_depends = [expand(src_path, x) for x in flags.pop('c_depends', [])]
if not can_use_cython:
# can't use cython, so use the .c files instead.
pyx_path = '%s.c' % pyx_path[:-4]
_lang = flags.get('language', 'c')
if _lang == 'c++':
_extension = "cpp"
else:
_extension = "c"
pyx_path = f"{pyx_path[:-4]}.{_extension}"
if is_graphics:
depends = resolve_dependencies(pyx_path, depends)
f_depends = [x for x in depends if x.rsplit('.', 1)[-1] in (
Expand Down

0 comments on commit 4cd2bd8

Please sign in to comment.