Commit 0588eac2 authored by Benjamin Peterson's avatar Benjamin Peterson

merge heads

parents 43844351 b67075be
...@@ -22,12 +22,13 @@ work. One should use importlib as the public-facing version of this module. ...@@ -22,12 +22,13 @@ work. One should use importlib as the public-facing version of this module.
CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin' CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin'
def _relax_case(): def _make_relax_case():
"""True if filenames must be checked case-insensitively."""
if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)): if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)):
"""True if filenames must be checked case-insensitively."""
def _relax_case(): def _relax_case():
return b'PYTHONCASEOK' in _os.environ return b'PYTHONCASEOK' in _os.environ
else: else:
"""True if filenames must be checked case-insensitively."""
def _relax_case(): def _relax_case():
return False return False
return _relax_case return _relax_case
...@@ -1117,7 +1118,7 @@ def _setup(sys_module, imp_module): ...@@ -1117,7 +1118,7 @@ def _setup(sys_module, imp_module):
setattr(self_module, '_os', os_module) setattr(self_module, '_os', os_module)
setattr(self_module, 'path_sep', path_sep) setattr(self_module, 'path_sep', path_sep)
# Constants # Constants
setattr(self_module, '_relax_case', _relax_case()) setattr(self_module, '_relax_case', _make_relax_case())
def _install(sys_module, imp_module): def _install(sys_module, imp_module):
......
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