File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ def get_default_scheme():
325325
326326def get_makefile_filename ():
327327 """Return the path of the Makefile."""
328+ import warnings
328329
329330 # GH-127429: When cross-compiling, use the Makefile from the target, instead of the host Python.
330331 if cross_base := os .environ .get ('_PYTHON_PROJECT_BASE' ):
@@ -333,7 +334,11 @@ def get_makefile_filename():
333334 if _PYTHON_BUILD :
334335 return os .path .join (_PROJECT_BASE , "Makefile" )
335336
336- if hasattr (sys , 'abiflags' ):
337+ with warnings .catch_warnings ():
338+ warnings .simplefilter ('ignore' , DeprecationWarning )
339+ has_abiflags = hasattr (sys , 'abiflags' )
340+
341+ if has_abiflags :
337342 config_dir_name = f'config-{ _PY_VERSION_SHORT } { sys .abiflags } '
338343 else :
339344 config_dir_name = 'config'
You can’t perform that action at this time.
0 commit comments