diff options
author | Dan Hipschman <dsh@linux.ucla.edu> | 2012-12-06 21:01:43 -0800 |
---|---|---|
committer | Dan Hipschman <dsh@linux.ucla.edu> | 2012-12-06 21:01:43 -0800 |
commit | 761ba5dda03fededefea449672ace4560fd409a7 (patch) | |
tree | 5e448d61040eb7835c16de32f405e7b1f0f88767 /numpy/distutils/command/build_src.py | |
parent | c97f405d47d059c00df6b2aea7f79fc5c520dda6 (diff) | |
download | numpy-761ba5dda03fededefea449672ace4560fd409a7.tar.gz |
Fix distutils build_src with 'c++' in swig_opts and a c++ comment in the .i file (issue #2551)
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: |