summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/install.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:10:36 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 11:10:36 (GMT)
commit885bdc4946890f4bb80557fab80c3874b2cc4d39 (patch)
treebe6280757afecfd1b41c886f651d6cafae384df1 /Lib/distutils/command/install.py
parenta9725f86a984f74e74f09c4808fc8f4b403728b2 (diff)
downloadcpython-885bdc4946890f4bb80557fab80c3874b2cc4d39.zip
cpython-885bdc4946890f4bb80557fab80c3874b2cc4d39.tar.gz
cpython-885bdc4946890f4bb80557fab80c3874b2cc4d39.tar.bz2
Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
Diffstat (limited to 'Lib/distutils/command/install.py')
-rw-r--r--Lib/distutils/command/install.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 67db007..9474e9c 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -290,8 +290,8 @@ class install(Command):
'dist_version': self.distribution.get_version(),
'dist_fullname': self.distribution.get_fullname(),
'py_version': py_version,
- 'py_version_short': py_version[0:3],
- 'py_version_nodot': py_version[0] + py_version[2],
+ 'py_version_short': '%d.%d' % sys.version_info[:2],
+ 'py_version_nodot': '%d%d' % sys.version_info[:2],
'sys_prefix': prefix,
'prefix': prefix,
'sys_exec_prefix': exec_prefix,