summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-12-07 17:50:48 (GMT)
committerGitHub <noreply@github.com>2020-12-07 17:50:48 (GMT)
commitca52aa3ddd949ce2d259b4263344339b56db00b7 (patch)
tree8d06c1e6317ccbb8cc575b0421d05b4126430ff5 /Lib/sysconfig.py
parenta4e7d5f750e06e31a80a83c2af02b1a40cecd0ff (diff)
downloadcpython-ca52aa3ddd949ce2d259b4263344339b56db00b7.zip
cpython-ca52aa3ddd949ce2d259b4263344339b56db00b7.tar.gz
cpython-ca52aa3ddd949ce2d259b4263344339b56db00b7.tar.bz2
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils (GH-22088)
(cherry picked from commit c0afb7fa0ebd1c0e95c0760bbe75a99a8dd12ea6) Co-authored-by: Matti Picus <matti.picus@gmail.com>
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r--Lib/sysconfig.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index b9e2faf..9caf158 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -426,10 +426,11 @@ def _init_posix(vars):
def _init_non_posix(vars):
"""Initialize the module as appropriate for NT"""
# set basic install directories
+ import _imp
vars['LIBDEST'] = get_path('stdlib')
vars['BINLIBDEST'] = get_path('platstdlib')
vars['INCLUDEPY'] = get_path('include')
- vars['EXT_SUFFIX'] = '.pyd'
+ vars['EXT_SUFFIX'] = _imp.extension_suffixes()[0]
vars['EXE'] = '.exe'
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))