@@ -667,8 +667,8 @@ def WindowsSDKExecutablePath(self):
667667 else :
668668 netfxver = 40
669669 hidex86 = True if self .vs_ver <= 12.0 else False
670- arch = self .pi .current_dir (x64 = True , hidex86 = hidex86 )
671- fx = 'WinSDK-NetFx%dTools%s' % ( netfxver , arch . replace ( ' \\ ' , '-' ))
670+ arch = self .pi .current_dir (x64 = True , hidex86 = hidex86 ). replace ( ' \\ ' , '-' )
671+ fx = f 'WinSDK-NetFx{ netfxver } Tools { arch } '
672672
673673 # list all possibles registry paths
674674 regpaths = []
@@ -839,8 +839,8 @@ def _find_dot_net_versions(self, bits) -> tuple[str, ...]:
839839 versions
840840 """
841841 # Find actual .NET version in registry
842- reg_ver = self .ri .lookup (self .ri .vc , 'frameworkver%d' % bits )
843- dot_net_dir = getattr (self , 'FrameworkDir%d' % bits )
842+ reg_ver = self .ri .lookup (self .ri .vc , f 'frameworkver{ bits } ' )
843+ dot_net_dir = getattr (self , f 'FrameworkDir{ bits } ' )
844844 ver = reg_ver or self ._use_last_dir_name (dot_net_dir , 'v' ) or ''
845845
846846 # Set .NET versions for specified MSVC++ version
@@ -1404,7 +1404,7 @@ def VCRuntimeRedist(self) -> str | None:
14041404
14051405 Returns the first suitable path found or None.
14061406 """
1407- vcruntime = 'vcruntime%d0.dll' % self .vc_ver
1407+ vcruntime = f 'vcruntime{ self .vc_ver } 0.dll'
14081408 arch_subdir = self .pi .target_dir (x64 = True ).strip ('\\ ' )
14091409
14101410 # Installation prefixes candidates
@@ -1420,9 +1420,9 @@ def VCRuntimeRedist(self) -> str | None:
14201420
14211421 # CRT directory
14221422 crt_dirs = (
1423- 'Microsoft.VC%d.CRT' % ( self .vc_ver * 10 ) ,
1423+ f 'Microsoft.VC{ self .vc_ver * 10 } .CRT' ,
14241424 # Sometime store in directory with VS version instead of VC
1425- 'Microsoft.VC%d.CRT' % ( int (self .vs_ver ) * 10 ) ,
1425+ f 'Microsoft.VC{ int (self .vs_ver ) * 10 } .CRT' ,
14261426 )
14271427
14281428 # vcruntime path
0 commit comments