diff options
| -rw-r--r-- | changelog.d/2953.change.rst | 1 | ||||
| -rw-r--r-- | setuptools/command/easy_install.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/2953.change.rst b/changelog.d/2953.change.rst new file mode 100644 index 00000000..bc06b045 --- /dev/null +++ b/changelog.d/2953.change.rst @@ -0,0 +1 @@ +Fixed a bug that easy install incorrectly parsed Python 3.10 version string. diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index aad5794a..a2962a7d 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -243,8 +243,8 @@ class easy_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': f'{sys.version_info.major}.{sys.version_info.minor}', + 'py_version_nodot': f'{sys.version_info.major}{sys.version_info.minor}', 'sys_prefix': prefix, 'prefix': prefix, 'sys_exec_prefix': exec_prefix, |
