diff options
Diffstat (limited to 'setuptools/py27compat.py')
| -rw-r--r-- | setuptools/py27compat.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 4e3e4ab3..2985011b 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -2,7 +2,9 @@ Compatibility Support for Python 2.7 and earlier """ -import sys +import platform + +from setuptools.extern import six def get_all_headers(message, key): @@ -12,7 +14,15 @@ def get_all_headers(message, key): return message.get_all(key) -if sys.version_info < (3,): - +if six.PY2: def get_all_headers(message, key): return message.getheaders(key) + + +linux_py2_ascii = ( + platform.system() == 'Linux' and + six.PY2 +) + +rmtree_safe = str if linux_py2_ascii else lambda x: x +"""Workaround for http://bugs.python.org/issue24672""" |
