summaryrefslogtreecommitdiff
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-07-05 15:06:51 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-07-05 15:06:51 -0400
commitb49435397a5094f94678adf3549cc8941aa469b7 (patch)
treeb123bdd63482393ba1e2859364920f40a3d9f71d /setuptools/dist.py
parent5b865b1b6e23379d23aa80e74adb38db8b14b6ca (diff)
downloadpython-setuptools-git-b49435397a5094f94678adf3549cc8941aa469b7.tar.gz
Use six for Python 2 compatibility
--HG-- branch : feature/issue-229 extra : source : 7b1997ececc5772798ce33a0f8e77387cb55a977
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index dac4dfa8..c6ac1946 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -13,8 +13,9 @@ from distutils.core import Distribution as _Distribution
from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
DistutilsSetupError)
+import six
+
from setuptools.depends import Require
-from setuptools.compat import basestring, PY2
import pkg_resources
def _get_unpatched(cls):
@@ -132,7 +133,7 @@ def check_entry_points(dist, attr, value):
raise DistutilsSetupError(e)
def check_test_suite(dist, attr, value):
- if not isinstance(value,basestring):
+ if not isinstance(value, six.string_types):
raise DistutilsSetupError("test_suite must be a string")
def check_package_data(dist, attr, value):
@@ -632,7 +633,7 @@ class Distribution(_Distribution):
"""
import sys
- if PY2 or self.help_commands:
+ if six.PY2 or self.help_commands:
return _Distribution.handle_display_options(self, option_order)
# Stdout may be StringIO (e.g. in tests)