3 vendor - QEMU python vendoring utility
7 QEMU python vendoring utility
10 -h, --help show this help message and exit
13 # Copyright (C) 2023 Red Hat, Inc.
16 # John Snow <jsnow@redhat.com>
18 # This work is licensed under the terms of the GNU GPL, version 2 or
19 # later. See the COPYING file in the top-level directory.
23 from pathlib
import Path
30 """Run the vendoring utility. See module-level docstring."""
32 if os
.environ
.get("DEBUG") or os
.environ
.get("V"):
35 # No options or anything for now, but I guess
36 # you'll figure that out when you run --help.
37 parser
= argparse
.ArgumentParser(
39 description
="QEMU python vendoring utility",
45 "d677b809c4895dcbaac9bf6c43703fcb3609a4b24c6057c78f828590049cf43a",
48 "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
51 vendor_dir
= Path(__file__
, "..", "..", "wheels").resolve()
53 with tempfile
.NamedTemporaryFile(mode
="w", encoding
="utf-8") as file:
54 for dep_spec
, checksum
in packages
.items():
55 print(f
"{dep_spec} --hash=sha256:{checksum}", file=file)
70 print(" ".join(cli_args
))
71 subprocess
.run(cli_args
, check
=True)
76 if __name__
== "__main__":