Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0689a3

Browse files
committed
REF: remove obsolete code.
1 parent 8a1496d commit d0689a3

3 files changed

Lines changed: 1 addition & 35 deletions

File tree

numpy/distutils/ccompiler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ def CCompiler_spawn(self, cmd, display=None):
7070
else:
7171
msg = ''
7272
raise DistutilsExecError('Command "%s" failed with exit status %d%s' % (cmd, s, msg))
73-
if hasattr(self, 'config_output'):
74-
self.config_output += o
7573

7674
replace_method(CCompiler, 'spawn', CCompiler_spawn)
7775

numpy/distutils/command/autodist.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,3 @@ def check_gcc_variable_attribute(cmd, attribute):
7575
}
7676
""" % (attribute, )
7777
return cmd.try_compile(body, None, None) != 0
78-
79-
def check_compile_without_warning(cmd, body):
80-
cmd._check_compiler()
81-
ret, output = cmd.try_output_compile(body, None, None)
82-
if not ret or len(output) > 0:
83-
return False
84-
return True

numpy/distutils/command/config.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
from numpy.distutils.command.autodist import (check_gcc_function_attribute,
2020
check_gcc_variable_attribute,
2121
check_inline,
22-
check_compiler_gcc4,
23-
check_compile_without_warning)
22+
check_compiler_gcc4)
2423
from numpy.distutils.compat import get_exception
2524

2625
LANG_EXT['f77'] = '.f'
@@ -46,26 +45,6 @@ def try_run(self, body, headers=None, include_dirs=None,
4645
return old_config.try_run(self, body, headers, include_dirs, libraries,
4746
library_dirs, lang)
4847

49-
def try_output_compile(self, body, headers=None, include_dirs=None, lang="c"):
50-
"""Try to compile a source file built from 'body' and 'headers'.
51-
Return true on success, false otherwise.
52-
"""
53-
# XXX: this is fairly ugly. Passing the output of executed command
54-
# would require heroic efforts so instead we use a dynamically created
55-
# instance variable on the compiler class to pass output between
56-
# compiler and the config command.
57-
self.compiler.config_output = ""
58-
self._check_compiler()
59-
try:
60-
self._compile(body, headers, include_dirs, lang)
61-
status = True
62-
except CompileError:
63-
status = False
64-
65-
log.info(status and "success!" or "failure.")
66-
self._clean()
67-
return status, self.compiler.config_output
68-
6948
def _check_compiler (self):
7049
old_config._check_compiler(self)
7150
from numpy.distutils.fcompiler import FCompiler, new_fcompiler
@@ -432,10 +411,6 @@ def check_gcc_function_attribute(self, attribute, name):
432411
def check_gcc_variable_attribute(self, attribute):
433412
return check_gcc_variable_attribute(self, attribute)
434413

435-
def check_compile_without_warning(self, code):
436-
"""Returns True if the given code may be compiled without warning."""
437-
return check_compile_without_warning(self, code)
438-
439414
def get_output(self, body, headers=None, include_dirs=None,
440415
libraries=None, library_dirs=None,
441416
lang="c", use_tee=None):

0 commit comments

Comments
 (0)