bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311)

diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index d3e1d3a..6309c3e 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -318,26 +318,30 @@
         # string compares seem wrong, but are what sysconfig.py itself uses
         if self.target_version and self.target_version < cur_version:
             if self.target_version < "2.4":
-                bv = 6.0
+                bv = '6.0'
             elif self.target_version == "2.4":
-                bv = 7.1
+                bv = '7.1'
             elif self.target_version == "2.5":
-                bv = 8.0
+                bv = '8.0'
             elif self.target_version <= "3.2":
-                bv = 9.0
+                bv = '9.0'
             elif self.target_version <= "3.4":
-                bv = 10.0
+                bv = '10.0'
             else:
-                bv = 14.0
+                bv = '14.0'
         else:
             # for current version - use authoritative check.
             try:
                 from msvcrt import CRT_ASSEMBLY_VERSION
             except ImportError:
                 # cross-building, so assume the latest version
-                bv = 14.0
+                bv = '14.0'
             else:
-                bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]))
+                bv = '.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2])
+                if bv == '14.11':
+                    # v141 and v140 are binary compatible,
+                    # so keep using the 14.0 stub.
+                    bv = '14.0'
 
 
         # wininst-x.y.exe is in the same directory as this file
@@ -353,7 +357,7 @@
         else:
             sfix = ''
 
-        filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
+        filename = os.path.join(directory, "wininst-%s%s.exe" % (bv, sfix))
         f = open(filename, "rb")
         try:
             return f.read()