diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-27 13:58:22 -0500 | 
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-27 13:58:22 -0500 | 
| commit | 8a94f99bfbb19859aed1d96e5d169c80b51936d0 (patch) | |
| tree | 04b4cbf4792833380e7595f266db5cfeb7ae29dc /setuptools/command | |
| parent | bc47a75d4d97f34f9ad49a5142c351c74354cd41 (diff) | |
| download | python-setuptools-git-8a94f99bfbb19859aed1d96e5d169c80b51936d0.tar.gz | |
Extract py31compat module for get_config_vars and get_path
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/easy_install.py | 17 | 
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:  | 
