MCPcopy Create free account
hub / github.com/numpy/numpy / _wrap_method

Method _wrap_method

numpy/distutils/command/config.py:88–102  ·  view source on GitHub ↗
(self, mth, lang, args)

Source from the content-addressed store, hash-verified

86 self.fcompiler.show_customization()
87
88 def _wrap_method(self, mth, lang, args):
89 from distutils.ccompiler import CompileError
90 from distutils.errors import DistutilsExecError
91 save_compiler = self.compiler
92 if lang in ['f77', 'f90']:
93 self.compiler = self.fcompiler
94 if self.compiler is None:
95 raise CompileError('%s compiler is not set' % (lang,))
96 try:
97 ret = mth(*((self,)+args))
98 except (DistutilsExecError, CompileError) as e:
99 self.compiler = save_compiler
100 raise CompileError from e
101 self.compiler = save_compiler
102 return ret
103
104 def _compile (self, body, headers, include_dirs, lang):
105 src, obj = self._wrap_method(old_config._compile, lang,

Callers 2

_compileMethod · 0.95
_linkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected