Skip to content

Commit 983eb78

Browse files
committed
BUG: make distutils.misc_util.is_string recognize unicode.
This was triggered by the numpy version string (which is unicde) being included in metadata. This could also solve other problems for external users of numpy.distutils.
1 parent b9f4809 commit 983eb78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpy/distutils/misc_util.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def clean_up_temporary_directory():
3838
from sets import Set as set
3939

4040
from numpy.distutils.compat import get_exception
41+
from numpy.compat import basestring
4142

4243
__all__ = ['Configuration', 'get_numpy_include_dirs', 'default_config_dict',
4344
'dict_append', 'appendpath', 'generate_config_py',
@@ -429,7 +430,7 @@ def _get_f90_modules(source):
429430
return modules
430431

431432
def is_string(s):
432-
return isinstance(s, str)
433+
return isinstance(s, basestring)
433434

434435
def all_strings(lst):
435436
"""Return True if all items in lst are string objects. """

0 commit comments

Comments
 (0)