mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-04 03:32:27 +00:00
Tell _frozen_importlib to consider bytecode first (#248)
This commit is contained in:
parent
c70422586a
commit
ace523c79b
7 changed files with 2896 additions and 2887 deletions
|
@ -1364,7 +1364,7 @@ def _get_supported_file_loaders():
|
|||
extensions = ExtensionFileLoader, _imp.extension_suffixes()
|
||||
source = SourceFileLoader, SOURCE_SUFFIXES
|
||||
bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES
|
||||
return [extensions, source, bytecode]
|
||||
return [extensions, bytecode, source]
|
||||
|
||||
|
||||
def _setup(_bootstrap_module):
|
||||
|
|
3
third_party/python/Lib/site.py
vendored
3
third_party/python/Lib/site.py
vendored
|
@ -123,6 +123,9 @@ def removeduppaths():
|
|||
# Filter out duplicate paths (on case-insensitive file systems also
|
||||
# if they only differ in case); turn relative paths into absolute
|
||||
# paths.
|
||||
if dir.startswith("zip!"): # don't absolutize, look within the APE!
|
||||
L.append(dir)
|
||||
continue
|
||||
dir, dircase = makepath(dir)
|
||||
if not dircase in known_paths:
|
||||
L.append(dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue