@@ -664,8 +664,8 @@ def WindowsSDKExecutablePath(self):
664664 else :
665665 netfxver = 40
666666 hidex86 = True if self .vs_ver <= 12.0 else False
667- arch = self .pi .current_dir (x64 = True , hidex86 = hidex86 )
668- fx = 'WinSDK-NetFx%dTools%s' % ( netfxver , arch . replace ( ' \\ ' , '-' ))
667+ arch = self .pi .current_dir (x64 = True , hidex86 = hidex86 ). replace ( ' \\ ' , '-' )
668+ fx = f 'WinSDK-NetFx{ netfxver } Tools { arch } '
669669
670670 # list all possibles registry paths
671671 regpaths = []
@@ -836,8 +836,8 @@ def _find_dot_net_versions(self, bits):
836836 versions
837837 """
838838 # Find actual .NET version in registry
839- reg_ver = self .ri .lookup (self .ri .vc , 'frameworkver%d' % bits )
840- dot_net_dir = getattr (self , 'FrameworkDir%d' % bits )
839+ reg_ver = self .ri .lookup (self .ri .vc , f 'frameworkver{ bits } ' )
840+ dot_net_dir = getattr (self , f 'FrameworkDir{ bits } ' )
841841 ver = reg_ver or self ._use_last_dir_name (dot_net_dir , 'v' ) or ''
842842
843843 # Set .NET versions for specified MSVC++ version
@@ -1393,7 +1393,7 @@ def VCRuntimeRedist(self) -> str | None:
13931393
13941394 Returns the first suitable path found or None.
13951395 """
1396- vcruntime = 'vcruntime%d0.dll' % self .vc_ver
1396+ vcruntime = f 'vcruntime{ self .vc_ver } 0.dll'
13971397 arch_subdir = self .pi .target_dir (x64 = True ).strip ('\\ ' )
13981398
13991399 # Installation prefixes candidates
@@ -1409,9 +1409,9 @@ def VCRuntimeRedist(self) -> str | None:
14091409
14101410 # CRT directory
14111411 crt_dirs = (
1412- 'Microsoft.VC%d.CRT' % ( self .vc_ver * 10 ) ,
1412+ f 'Microsoft.VC{ self .vc_ver * 10 } .CRT' ,
14131413 # Sometime store in directory with VS version instead of VC
1414- 'Microsoft.VC%d.CRT' % ( int (self .vs_ver ) * 10 ) ,
1414+ f 'Microsoft.VC{ int (self .vs_ver ) * 10 } .CRT' ,
14151415 )
14161416
14171417 # vcruntime path
0 commit comments