diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-04-08 10:44:34 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-04-08 10:44:34 -0400 |
commit | b50fdf497d6970002a2f7156650d7da21e2e39f5 (patch) | |
tree | 1ecda049e94f2978680cf4d42b3f49288db0f2d5 /setuptools/py27compat.py | |
parent | 1d928cbc7b2cfcf1ffd2ec27f83ee33f0af39dfe (diff) | |
download | external_python_setuptools-b50fdf497d6970002a2f7156650d7da21e2e39f5.tar.gz external_python_setuptools-b50fdf497d6970002a2f7156650d7da21e2e39f5.tar.bz2 external_python_setuptools-b50fdf497d6970002a2f7156650d7da21e2e39f5.zip |
In msvc9_query_vcvarsall, ensure dict values are not unicode. Fixes #992.
Diffstat (limited to 'setuptools/py27compat.py')
-rw-r--r-- | setuptools/py27compat.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/setuptools/py27compat.py b/setuptools/py27compat.py index 701283c8..0f924889 100644 --- a/setuptools/py27compat.py +++ b/setuptools/py27compat.py @@ -26,3 +26,17 @@ linux_py2_ascii = ( rmtree_safe = str if linux_py2_ascii else lambda x: x """Workaround for http://bugs.python.org/issue24672""" + + +def dict_values_strings(dict_): + """ + Given a dict, make sure the text values are str. + """ + if six.PY3: + return dict_ + + # When dropping Python 2.6 support, use a dict constructor + return dict( + (key, str(value)) + for key, value in dict_.iteritems() + ) |