Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(105662)

Side by Side Diff: Lib/importlib/_bootstrap_external.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/distutils/tests/test_util.py ('k') | Lib/platform.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """Core implementation of path-based import. 1 """Core implementation of path-based import.
2 2
3 This module is NOT meant to be directly imported! It has been designed such 3 This module is NOT meant to be directly imported! It has been designed such
4 that it can be bootstrapped into Python as the implementation of import. As 4 that it can be bootstrapped into Python as the implementation of import. As
5 such it requires the injection of specific modules and attributes in order to 5 such it requires the injection of specific modules and attributes in order to
6 work. One should use importlib as the public-facing version of this module. 6 work. One should use importlib as the public-facing version of this module.
7 7
8 """ 8 """
9 # 9 #
10 # IMPORTANT: Whenever making changes to this module, be sure to run 10 # IMPORTANT: Whenever making changes to this module, be sure to run
11 # a top-level make in order to get the frozen version of the module 11 # a top-level make in order to get the frozen version of the module
12 # updated. Not doing so will result in the Makefile to fail for 12 # updated. Not doing so will result in the Makefile to fail for
13 # all others who don't have a ./python around to freeze the module 13 # all others who don't have a ./python around to freeze the module
14 # in the early stages of compilation. 14 # in the early stages of compilation.
15 # 15 #
16 16
17 # See importlib._setup() for what is injected into the global namespace. 17 # See importlib._setup() for what is injected into the global namespace.
18 18
19 # When editing this code be aware that code executed at import time CANNOT 19 # When editing this code be aware that code executed at import time CANNOT
20 # reference any injected objects! This includes not only global code but also 20 # reference any injected objects! This includes not only global code but also
21 # anything specified at the class level. 21 # anything specified at the class level.
22 22
23 # Bootstrap-related code ###################################################### 23 # Bootstrap-related code ######################################################
24 24
25 _CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin' 25 _CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin', 'ios'
26 26
27 27
28 def _make_relax_case(): 28 def _make_relax_case():
29 if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS): 29 if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
30 def _relax_case(): 30 def _relax_case():
31 """True if filenames must be checked case-insensitively.""" 31 """True if filenames must be checked case-insensitively."""
32 return b'PYTHONCASEOK' in _os.environ 32 return b'PYTHONCASEOK' in _os.environ
33 else: 33 else:
34 def _relax_case(): 34 def _relax_case():
35 """True if filenames must be checked case-insensitively.""" 35 """True if filenames must be checked case-insensitively."""
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 supported_loaders = _get_supported_file_loaders() 1416 supported_loaders = _get_supported_file_loaders()
1417 sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)]) 1417 sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)])
1418 if _os.__name__ == 'nt': 1418 if _os.__name__ == 'nt':
1419 sys.meta_path.append(WindowsRegistryFinder) 1419 sys.meta_path.append(WindowsRegistryFinder)
1420 sys.meta_path.append(PathFinder) 1420 sys.meta_path.append(PathFinder)
1421 1421
1422 # XXX We expose a couple of classes in _bootstrap for the sake of 1422 # XXX We expose a couple of classes in _bootstrap for the sake of
1423 # a setuptools bug (https://bitbucket.org/pypa/setuptools/issue/378). 1423 # a setuptools bug (https://bitbucket.org/pypa/setuptools/issue/378).
1424 _bootstrap_module.FileFinder = FileFinder 1424 _bootstrap_module.FileFinder = FileFinder
1425 _bootstrap_module.SourceFileLoader = SourceFileLoader 1425 _bootstrap_module.SourceFileLoader = SourceFileLoader
OLDNEW
« no previous file with comments | « Lib/distutils/tests/test_util.py ('k') | Lib/platform.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+