File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,6 +414,13 @@ def _init_non_posix(vars):
414414 vars ['BINDIR' ] = os .path .dirname (_safe_realpath (sys .executable ))
415415 vars ['TZPATH' ] = ''
416416
417+ abiflags = vars ['abi_thread' ]
418+ if vars ['EXT_SUFFIX' ].endswith ('_d.' ):
419+ abiflags += 'd'
420+ # Do not touch lower-cased `abiflags` here.
421+ # sys.abiflags is absent on Windows. So vars['abiflags'] should be empty.
422+ vars ['ABIFLAGS' ] = abiflags
423+
417424#
418425# public APIs
419426#
@@ -541,6 +548,9 @@ def _init_config_vars():
541548 except AttributeError :
542549 _CONFIG_VARS ['py_version_nodot_plat' ] = ''
543550
551+ # e.g., 't' for free-threaded or '' for default build
552+ _CONFIG_VARS ['abi_thread' ] = 't' if _CONFIG_VARS .get ('Py_GIL_DISABLED' ) else ''
553+
544554 if os .name == 'nt' :
545555 _init_non_posix (_CONFIG_VARS )
546556 _CONFIG_VARS ['VPATH' ] = sys ._vpath
@@ -550,9 +560,6 @@ def _init_config_vars():
550560 # the init-function.
551561 _CONFIG_VARS ['userbase' ] = _getuserbase ()
552562
553- # e.g., 't' for free-threaded or '' for default build
554- _CONFIG_VARS ['abi_thread' ] = 't' if _CONFIG_VARS .get ('Py_GIL_DISABLED' ) else ''
555-
556563 # Always convert srcdir to an absolute path
557564 srcdir = _CONFIG_VARS .get ('srcdir' , _PROJECT_BASE )
558565 if os .name == 'posix' :
You can’t perform that action at this time.
0 commit comments