aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/bdist_egg.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2013-06-12 03:53:21 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2013-06-12 03:53:21 +0200
commitc04abca662dcbffd00d928e06fbf32b9f49f8e57 (patch)
tree992aca304622ab80b44630cb287c44bac0a2941a /setuptools/command/bdist_egg.py
parent0dfd7768a9a75bec3c2592b8d0b2a4fed4d825ab (diff)
downloadexternal_python_setuptools-c04abca662dcbffd00d928e06fbf32b9f49f8e57.tar.gz
external_python_setuptools-c04abca662dcbffd00d928e06fbf32b9f49f8e57.tar.bz2
external_python_setuptools-c04abca662dcbffd00d928e06fbf32b9f49f8e57.zip
Use new sysconfig module with Python 2.7 or >=3.2.
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r--setuptools/command/bdist_egg.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py
index c3356bb7..1ba0499e 100644
--- a/setuptools/command/bdist_egg.py
+++ b/setuptools/command/bdist_egg.py
@@ -7,10 +7,14 @@ import sys, os, marshal
from setuptools import Command
from distutils.dir_util import remove_tree, mkpath
try:
- from distutils.sysconfig import get_python_version, get_python_lib
+ # Python 2.7 or >=3.2
+ from sysconfig import get_path, get_python_version
+ def _get_purelib():
+ return get_path("purelib")
except ImportError:
- from sysconfig import get_python_version
- from distutils.sysconfig import get_python_lib
+ from distutils.sysconfig import get_python_lib, get_python_version
+ def _get_purelib():
+ return get_python_lib(False)
from distutils import log
from distutils.errors import DistutilsSetupError
@@ -130,7 +134,7 @@ class bdist_egg(Command):
# Hack for packages that install data to install's --install-lib
self.get_finalized_command('install').install_lib = self.bdist_dir
- site_packages = os.path.normcase(os.path.realpath(get_python_lib()))
+ site_packages = os.path.normcase(os.path.realpath(_get_purelib()))
old, self.distribution.data_files = self.distribution.data_files,[]
for item in old: