44# Pearu Peterson
55
66import os , signal
7+ import warnings
8+
79from distutils .command .config import config as old_config
810from distutils .command .config import LANG_EXT
911from distutils import log
@@ -22,6 +24,17 @@ def initialize_options(self):
2224 self .fcompiler = None
2325 old_config .initialize_options (self )
2426
27+ def try_run (self , body , headers = None , include_dirs = None ,
28+ libraries = None , library_dirs = None , lang = "c" ):
29+ warnings .warn ("\n +++++++++++++++++++++++++++++++++++++++++++++++++\n " \
30+ "Usage of try_run is deprecated: please do not \n " \
31+ "use it anymore, and avoid configuration checks \n " \
32+ "involving running executable on the target machine.\n " \
33+ "+++++++++++++++++++++++++++++++++++++++++++++++++\n " ,
34+ DeprecationWarning )
35+ return old_config .try_run (self , body , headers , include_dirs , libraries ,
36+ library_dirs , lang )
37+
2538 def _check_compiler (self ):
2639 old_config ._check_compiler (self )
2740 from numpy .distutils .fcompiler import FCompiler , new_fcompiler
@@ -215,6 +228,12 @@ def get_output(self, body, headers=None, include_dirs=None,
215228 built from 'body' and 'headers'. Returns the exit status code
216229 of the program and its output.
217230 """
231+ warnings .warn ("\n +++++++++++++++++++++++++++++++++++++++++++++++++\n " \
232+ "Usage of get_output is deprecated: please do not \n " \
233+ "use it anymore, and avoid configuration checks \n " \
234+ "involving running executable on the target machine.\n " \
235+ "+++++++++++++++++++++++++++++++++++++++++++++++++\n " ,
236+ DeprecationWarning )
218237 from distutils .ccompiler import CompileError , LinkError
219238 self ._check_compiler ()
220239 exitcode , output = 255 , ''
0 commit comments