Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py
index 337dd0b..c6f52e6 100644
--- a/Lib/distutils/command/build.py
+++ b/Lib/distutils/command/build.py
@@ -81,7 +81,7 @@
                             "--plat-name only supported on Windows (try "
                             "using './configure --help' on your platform)")
 
-        plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
+        plat_specifier = ".%s-%d.%d" % (self.plat_name, *sys.version_info[:2])
 
         # Make it so Python 2.x and Python 2.x with --with-pydebug don't
         # share the same build directories. Doing so confuses the build
@@ -114,7 +114,7 @@
                                            'temp' + plat_specifier)
         if self.build_scripts is None:
             self.build_scripts = os.path.join(self.build_base,
-                                              'scripts-' + sys.version[0:3])
+                                              'scripts-%d.%d' % sys.version_info[:2])
 
         if self.executable is None:
             self.executable = os.path.normpath(sys.executable)