diff options
author | tarek <none@none> | 2010-01-24 23:17:23 +0100 |
---|---|---|
committer | tarek <none@none> | 2010-01-24 23:17:23 +0100 |
commit | 5c528f51ae4ce4dd5359c350af9f0b3cacee36ba (patch) | |
tree | ecd4a234e53c6ac67a177bd4ddaeb822641c9cfe | |
parent | 8b3effb4f5fc0ee84fdf1e36d8bb7d8a17f1258d (diff) | |
download | external_python_setuptools-5c528f51ae4ce4dd5359c350af9f0b3cacee36ba.tar.gz external_python_setuptools-5c528f51ae4ce4dd5359c350af9f0b3cacee36ba.tar.bz2 external_python_setuptools-5c528f51ae4ce4dd5359c350af9f0b3cacee36ba.zip |
Python 2.7 compat
--HG--
branch : distribute
extra : rebase_source : f60f3110e0dd27c406f8fc48c4ed49da4dec8cac
-rw-r--r-- | docs/setuptools.txt | 10 | ||||
-rw-r--r-- | pkg_resources.py | 6 | ||||
-rw-r--r-- | setuptools/command/bdist_egg.py | 7 |
3 files changed, 16 insertions, 7 deletions
diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2e2366f6..da159bfe 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -405,13 +405,13 @@ unless you need the associated ``setuptools`` feature. below on `Automatic Resource Extraction`_. ``use_2to3`` - Convert the source code from Python 2 to Python 3 with 2to3 during the + Convert the source code from Python 2 to Python 3 with 2to3 during the build process. See :doc:`python3` for more details. ``convert_2to3_doctests`` - List of doctest source files that need to be converted with 2to3. + List of doctest source files that need to be converted with 2to3. See :doc:`python3` for more details. - + ``use_2to3_fixers`` A list of modules to search for additional fixers to be used during the 2to3 conversion. See :doc:`python3` for more details. @@ -2726,7 +2726,7 @@ History C-based module, instead of getting a ``NameError``). 0.6c7 - * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and + * Fixed ``distutils.filelist.findall()`` crashing on broken symlinks, and ``egg_info`` command failing on new, uncommitted SVN directories. * Fix import problems with nested namespace packages installed via @@ -2753,7 +2753,7 @@ History * Fix ``find_packages()`` treating ``ez_setup`` and directories with ``.`` in their names as packages. - + 0.6c5 * Fix uploaded ``bdist_rpm`` packages being described as ``bdist_egg`` packages under Python versions less than 2.5. diff --git a/pkg_resources.py b/pkg_resources.py index 3660a2a5..f31789e9 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -207,7 +207,11 @@ def get_build_platform(): XXX Currently this is the same as ``distutils.util.get_platform()``, but it needs some hacks for Linux and Mac OS X. """ - from distutils.util import get_platform + try: + from distutils.util import get_platform + except ImportError: + from sysconfig import get_platform + plat = get_platform() if sys.platform == "darwin" and not plat.startswith('macosx-'): try: diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 43589c23..90e1f525 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -6,7 +6,12 @@ Build .egg distributions""" import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath -from distutils.sysconfig import get_python_version, get_python_lib +try: + from distutils.sysconfig import get_python_version, get_python_lib +except ImportError: + from sysconfig import get_python_version + from distutils.sysconfig import get_python_lib + from distutils import log from distutils.errors import DistutilsSetupError from pkg_resources import get_build_platform, Distribution, ensure_directory |