kopia lustrzana https://github.com/micropython/micropython
tools/manifestfile.py: Replace recursive glob with os.walk.
Recursive glob isn't supported before Python 3.5. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>pull/9463/head
rodzic
924a3e03ec
commit
282401da5c
|
@ -311,14 +311,14 @@ class ManifestFile:
|
||||||
lib_dirs = ["unix-ffi"] + lib_dirs
|
lib_dirs = ["unix-ffi"] + lib_dirs
|
||||||
|
|
||||||
for lib_dir in lib_dirs:
|
for lib_dir in lib_dirs:
|
||||||
for manifest_path in glob.glob(
|
# Search for {lib_dir}/**/{name}/manifest.py.
|
||||||
os.path.join(
|
for root, dirnames, filenames in os.walk(
|
||||||
self._path_vars["MPY_LIB_DIR"], lib_dir, "**", name, "manifest.py"
|
os.path.join(self._path_vars["MPY_LIB_DIR"], lib_dir)
|
||||||
),
|
|
||||||
recursive=True,
|
|
||||||
):
|
):
|
||||||
self.include(manifest_path, **kwargs)
|
if os.path.basename(root) == name and "manifest.py" in filenames:
|
||||||
return
|
self.include(root, **kwargs)
|
||||||
|
return
|
||||||
|
|
||||||
raise ValueError("Library not found in local micropython-lib: {}".format(name))
|
raise ValueError("Library not found in local micropython-lib: {}".format(name))
|
||||||
else:
|
else:
|
||||||
# TODO: HTTP request to obtain URLs from manifest.json.
|
# TODO: HTTP request to obtain URLs from manifest.json.
|
||||||
|
|
Ładowanie…
Reference in New Issue