File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/scikit_build_core/builder Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 4
4
import re
5
5
import sys
6
6
import sysconfig
7
+ import typing
7
8
from pathlib import Path
8
9
from typing import Mapping
9
10
@@ -120,7 +121,15 @@ def configure(
120
121
# Workaround for bug in PyPy and packaging that is not handled in CMake
121
122
# According to PEP 3149, SOABI and EXT_SUFFIX are interchangeable (and
122
123
# the latter is much more likely to be correct as it is used elsewhere)
123
- ext_suffix = sysconfig .get_config_var ("EXT_SUFFIX" )
124
+ if sys .version_info < (3 , 8 , 7 ):
125
+ # See https://github.com/python/cpython/issues/84006
126
+ import distutils .sysconfig
127
+
128
+ ext_suffix = typing .cast (
129
+ str , distutils .sysconfig .get_config_var ("EXT_SUFFIX" )
130
+ )
131
+ else :
132
+ ext_suffix = sysconfig .get_config_var ("EXT_SUFFIX" )
124
133
assert ext_suffix
125
134
cache_config ["SKBUILD_SOABI" ] = ext_suffix .rsplit ("." , 1 )[0 ].lstrip ("." )
126
135
You can’t perform that action at this time.
0 commit comments