Commit 5c528f51 authored by tarek's avatar tarek

Python 2.7 compat

--HG--
branch : distribute
extra : rebase_source : f60f3110e0dd27c406f8fc48c4ed49da4dec8cac
parent 8b3effb4
......@@ -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.
"""
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