diff options
author | schnaitterm <schnaitterm@users.noreply.github.com> | 2017-11-30 12:19:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 12:19:36 -0500 |
commit | 492f3bd211f87e175e9e87647537079536bdf98f (patch) | |
tree | 7eb8e2f9dd0dac903d5b8e6e135f315188599d94 /numpy/core/setup_common.py | |
parent | 362ea38c788dc032de234738e1eed1e79260a476 (diff) | |
download | numpy-492f3bd211f87e175e9e87647537079536bdf98f.tar.gz |
Removed try/except block
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r-- | numpy/core/setup_common.py | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index f6544e954..36988475a 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -220,19 +220,15 @@ def check_long_double_representation(cmd): # which generates intermediary object files and prevents checking the # float representation. elif sys.platform != "win32" and cmd.compiler.compiler_type.startswith('intel') \ - and '-ipo' in cmd.compiler.cc_exe: - try: - newcompiler = cmd.compiler.cc_exe.replace(' -ipo', '') - cmd.compiler.set_executables( - compiler=newcompiler, - compiler_so=newcompiler, - compiler_cxx=newcompiler, - linker_exe=newcompiler, - linker_so=newcompiler + ' -shared' - ) - except (AttributeError, ValueError): - pass - + and '-ipo' in cmd.compiler.cc_exe: + newcompiler = cmd.compiler.cc_exe.replace(' -ipo', '') + cmd.compiler.set_executables( + compiler=newcompiler, + compiler_so=newcompiler, + compiler_cxx=newcompiler, + linker_exe=newcompiler, + linker_so=newcompiler + ' -shared' + ) # We need to use _compile because we need the object filename src, obj = cmd._compile(body, None, None, 'c') |