summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-08-17 19:14:48 -0700
committerAnthony Sottile <asottile@umich.edu>2019-08-17 19:18:07 -0700
commit43add1d3f5138e38adc4940647cc6eae94fb6123 (patch)
tree5be3b39a6b43a82ddf113b948484d0e1b75458e7 /setuptools/command/easy_install.py
parent2cd2fdcb69426de4bb9d63d638244f4ae6a1ca27 (diff)
downloadpython-setuptools-git-43add1d3f5138e38adc4940647cc6eae94fb6123.tar.gz
Fixes for python3.10
Diffstat (limited to 'setuptools/command/easy_install.py')
-rw-r--r--setuptools/command/easy_install.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 06c98271..593ed777 100644
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -241,7 +241,7 @@ class easy_install(Command):
"""
Render the Setuptools version and installation details, then exit.
"""
- ver = sys.version[:3]
+ ver = '{}.{}'.format(*sys.version_info)
dist = get_distribution('setuptools')
tmpl = 'setuptools {dist.version} from {dist.location} (Python {ver})'
print(tmpl.format(**locals()))
@@ -1412,7 +1412,7 @@ def get_site_dirs():
os.path.join(
prefix,
"lib",
- "python" + sys.version[:3],
+ "python{}.{}".format(*sys.version_info),
"site-packages",
),
os.path.join(prefix, "lib", "site-python"),
@@ -1433,7 +1433,7 @@ def get_site_dirs():
home,
'Library',
'Python',
- sys.version[:3],
+ '{}.{}'.format(*sys.version_info),
'site-packages',
)
sitedirs.append(home_sp)