summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index fd133b6c..61d51450 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -32,19 +32,7 @@ from distutils import log, dir_util
import pkg_resources
from setuptools import Command, _dont_write_bytecode
from setuptools.sandbox import run_setup
-try:
- # Python 2.7 or >=3.2
- from sysconfig import get_config_vars, get_path
- def _get_platlib():
- return get_path("platlib")
- def _get_purelib():
- return get_path("purelib")
-except ImportError:
- from distutils.sysconfig import get_config_vars, get_python_lib
- def _get_platlib():
- return get_python_lib(True)
- def _get_purelib():
- return get_python_lib(False)
+from setuptools.py31compat import get_path, get_config_vars
from distutils.util import get_platform
from distutils.util import convert_path, subst_vars
@@ -1288,7 +1276,8 @@ def get_site_dirs():
'Python',
sys.version[:3],
'site-packages'))
- for site_lib in (_get_purelib(), _get_platlib()):
+ lib_paths = get_path('purelib'), get_path('platlib')
+ for site_lib in lib_paths:
if site_lib not in sitedirs: sitedirs.append(site_lib)
if HAS_USER_SITE: