kopia lustrzana https://github.com/micropython/micropython-lib
upip: Reduce amount of debug output (use --debug to re-enable).
rodzic
e143637b50
commit
b90bca7468
12
upip/upip.py
12
upip/upip.py
|
@ -58,7 +58,8 @@ def install_tar(f, prefix):
|
||||||
if fname.endswith("/requires.txt"):
|
if fname.endswith("/requires.txt"):
|
||||||
meta["deps"] = f.extractfile(info).read()
|
meta["deps"] = f.extractfile(info).read()
|
||||||
save = False
|
save = False
|
||||||
print("Skipping", fname)
|
if debug:
|
||||||
|
print("Skipping", fname)
|
||||||
break
|
break
|
||||||
|
|
||||||
if save:
|
if save:
|
||||||
|
@ -71,7 +72,8 @@ def install_tar(f, prefix):
|
||||||
if e.args[0] != errno.EEXIST:
|
if e.args[0] != errno.EEXIST:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
print("Extracting " + outfname)
|
if debug:
|
||||||
|
print("Extracting " + outfname)
|
||||||
subf = f.extractfile(info)
|
subf = f.extractfile(info)
|
||||||
save_file(outfname, subf)
|
save_file(outfname, subf)
|
||||||
return meta
|
return meta
|
||||||
|
@ -198,13 +200,15 @@ def main():
|
||||||
# sets would be perfect here, but don't depend on them
|
# sets would be perfect here, but don't depend on them
|
||||||
installed = []
|
installed = []
|
||||||
while to_install:
|
while to_install:
|
||||||
print("Queue:", to_install)
|
if debug:
|
||||||
|
print("Queue:", to_install)
|
||||||
pkg_spec = to_install.pop(0)
|
pkg_spec = to_install.pop(0)
|
||||||
if pkg_spec in installed:
|
if pkg_spec in installed:
|
||||||
continue
|
continue
|
||||||
meta = install_pkg(pkg_spec, install_path)
|
meta = install_pkg(pkg_spec, install_path)
|
||||||
installed.append(pkg_spec)
|
installed.append(pkg_spec)
|
||||||
print(meta)
|
if debug:
|
||||||
|
print(meta)
|
||||||
deps = meta.get("deps", "").rstrip()
|
deps = meta.get("deps", "").rstrip()
|
||||||
if deps:
|
if deps:
|
||||||
deps = deps.decode("utf-8").split("\n")
|
deps = deps.decode("utf-8").split("\n")
|
||||||
|
|
Ładowanie…
Reference in New Issue