Do debug printing in JSON since pprint is nonsense
This commit is contained in:
parent
df856aa694
commit
72f82e0ace
1 changed files with 8 additions and 7 deletions
|
@ -12,7 +12,6 @@ import zipfile
|
||||||
from email.parser import Parser
|
from email.parser import Parser
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pprint import pprint
|
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
from zapp.support.pep425 import compress_tags, decompress_tag
|
from zapp.support.pep425 import compress_tags, decompress_tag
|
||||||
|
@ -216,9 +215,9 @@ def rezip_wheels(opts, manifest):
|
||||||
pass
|
pass
|
||||||
wf = str(wf)
|
wf = str(wf)
|
||||||
else:
|
else:
|
||||||
if opts.debug:
|
if opts.debug and False:
|
||||||
print("---")
|
print("\n---")
|
||||||
pprint({"$type": "whl", **w})
|
json.dump({"$type": "whl", **w}, sys.stdout, indent=2)
|
||||||
|
|
||||||
wf = zip_wheel(opts.tmpdir, w)
|
wf = zip_wheel(opts.tmpdir, w)
|
||||||
|
|
||||||
|
@ -330,15 +329,17 @@ def main():
|
||||||
manifest = insert_manifest_json(opts, manifest)
|
manifest = insert_manifest_json(opts, manifest)
|
||||||
|
|
||||||
if opts.debug:
|
if opts.debug:
|
||||||
print("---")
|
print("\n---")
|
||||||
pprint(
|
json.dump(
|
||||||
{
|
{
|
||||||
"$type": "zapp",
|
"$type": "zapp",
|
||||||
"opts": {
|
"opts": {
|
||||||
k: getattr(opts, k) for k in dir(opts) if not k.startswith("_")
|
k: getattr(opts, k) for k in dir(opts) if not k.startswith("_")
|
||||||
},
|
},
|
||||||
"manifest": manifest,
|
"manifest": manifest,
|
||||||
}
|
},
|
||||||
|
sys.stdout,
|
||||||
|
indent=2
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(opts.output, "w") as zapp:
|
with open(opts.output, "w") as zapp:
|
||||||
|
|
Loading…
Reference in a new issue