summaryrefslogtreecommitdiff
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
commit11194d70c12a5e302a091c629b4e3bae690e28d7 (patch)
tree627746c4ac1f12ed9bcb19c3dd5c865d0475a16a /setuptools/command/bdist_egg.py
parent3f28d186923dc76699d60daf1a182cc59782a285 (diff)
downloadpython-setuptools-bitbucket-11194d70c12a5e302a091c629b4e3bae690e28d7.tar.gz
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: