diff options
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index ae29aec0e..7bf3b43ce 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -673,24 +673,21 @@ class build_src(build_ext.build_ext): if typ is None: typ = get_swig_target(source) is_cpp = typ=='c++' - if is_cpp: - target_ext = '.cpp' else: typ2 = get_swig_target(source) if typ2 is None: log.warn('source %r does not define swig target, assuming %s swig target' \ % (source, typ)) - if is_cpp: - target_ext = '.cpp' elif typ!=typ2: log.warn('expected %r but source %r defines %r swig target' \ % (typ, source, typ2)) if typ2=='c++': log.warn('resetting swig target to c++ (some targets may have .c extension)') is_cpp = True - target_ext = '.cpp' else: log.warn('assuming that %r has c++ swig target' % (source)) + if is_cpp: + target_ext = '.cpp' target_file = os.path.join(target_dir,'%s_wrap%s' \ % (name, target_ext)) else: |