Commit 5c528f51 authored by tarek's avatar tarek

Python 2.7 compat

--HG--
branch : distribute
extra : rebase_source : f60f3110e0dd27c406f8fc48c4ed49da4dec8cac
parent 8b3effb4
......@@ -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.
......
......@@ -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:
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment