Feature
Use importlib.resources to load the typeshed resources, instead of finding them relative to __file__ in build.py.
Pitch
In android, we build all python binaries into self-contained zip files. So __file__ resolves to a path in a zip, and reading files relative to it fails. importlib.resources can handle both the zip case and the directory case transparently.
Currently we are using --custom-typeshed-dir as a workaround. (Code not public yet)
Feature
Use
importlib.resourcesto load the typeshed resources, instead of finding them relative to__file__inbuild.py.Pitch
In android, we build all python binaries into self-contained zip files. So
__file__resolves to a path in a zip, and reading files relative to it fails.importlib.resourcescan handle both the zip case and the directory case transparently.Currently we are using
--custom-typeshed-diras a workaround. (Code not public yet)