From f3df1464f4cef0137b83125e6717ae906b49fd28 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 6 Aug 2007 08:19:48 +0200 Subject: [PATCH] support 'language' option in distutils Extension --- Cython/Distutils/build_ext.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cython/Distutils/build_ext.py b/Cython/Distutils/build_ext.py index 6b775e7e..7b55fb58 100644 --- a/Cython/Distutils/build_ext.py +++ b/Cython/Distutils/build_ext.py @@ -37,8 +37,12 @@ class build_ext (distutils.command.build_ext.build_ext): if not self.extensions: return + #suffix = self.swig_cpp and '.cpp' or '.c' + suffix = '.c' if extension is not None: module_name = extension.name + if extension.language == "c++": + suffix = ".cpp" else: module_name = None @@ -46,8 +50,6 @@ class build_ext (distutils.command.build_ext.build_ext): pyx_sources = [source for source in sources if source.endswith('.pyx')] other_sources = [source for source in sources if not source.endswith('.pyx')] - #suffix = self.swig_cpp and '.cpp' or '.c' - suffix = '.c' for pyx in pyx_sources: # should I raise an exception if it doesn't exist? if os.path.exists(pyx): -- 2.26.2