File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import os
55import re
66import sys
7+ import sysconfig
78import unittest
89from test import support
910from test .support import import_helper
1718 EnumKey , CloseKey , DeleteKey , OpenKey
1819)
1920
20- def get_platform ():
21- # Port of distutils.util.get_platform().
22- TARGET_TO_PLAT = {
23- 'x86' : 'win32' ,
24- 'x64' : 'win-amd64' ,
25- 'arm' : 'win-arm32' ,
26- }
27- if ('VSCMD_ARG_TGT_ARCH' in os .environ and
28- os .environ ['VSCMD_ARG_TGT_ARCH' ] in TARGET_TO_PLAT ):
29- return TARGET_TO_PLAT [os .environ ['VSCMD_ARG_TGT_ARCH' ]]
30- elif 'amd64' in sys .version .lower ():
31- return 'win-amd64'
32- elif '(arm)' in sys .version .lower ():
33- return 'win-arm32'
34- elif '(arm64)' in sys .version .lower ():
35- return 'win-arm64'
36- else :
37- return sys .platform
38-
3921def delete_registry_tree (root , subkey ):
4022 try :
4123 hkey = OpenKey (root , subkey , access = KEY_ALL_ACCESS )
@@ -143,7 +125,7 @@ def test_tagged_suffix(self):
143125 suffixes = self .machinery .EXTENSION_SUFFIXES
144126 abi_flags = "t" if support .Py_GIL_DISABLED else ""
145127 ver = sys .version_info
146- platform = re .sub ('[^a-zA-Z0-9]' , '_' , get_platform ())
128+ platform = re .sub ('[^a-zA-Z0-9]' , '_' , sysconfig . get_platform ())
147129 expected_tag = f".cp{ ver .major } { ver .minor } { abi_flags } -{ platform } .pyd"
148130 try :
149131 untagged_i = suffixes .index (".pyd" )
You can’t perform that action at this time.
0 commit comments