mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-05-06 12:27:32 -04:00
2c86fb811d
Prior to 1.11.0, build with rust didn't use link_args. In QEMU case, it means that plugins could not work, since they rely on link_args to expose symbols from QEMU binary. https://mesonbuild.com/Release-notes-for-1-11-0.html#change-to-handling-of-linker-arguments-for-rust With this change, QEMU built with --enable-rust can pass all CI tests, including tests related to plugins. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> [Move from 1.11.0 to 1.11.1. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
79 lines
1.9 KiB
Python
Executable File
79 lines
1.9 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
vendor - QEMU python vendoring utility
|
|
|
|
usage: vendor [-h]
|
|
|
|
QEMU python vendoring utility
|
|
|
|
options:
|
|
-h, --help show this help message and exit
|
|
"""
|
|
|
|
# Copyright (C) 2023 Red Hat, Inc.
|
|
#
|
|
# Authors:
|
|
# John Snow <jsnow@redhat.com>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or
|
|
# later. See the COPYING file in the top-level directory.
|
|
|
|
import argparse
|
|
import os
|
|
from pathlib import Path
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
|
|
|
|
def main() -> int:
|
|
"""Run the vendoring utility. See module-level docstring."""
|
|
loud = False
|
|
if os.environ.get("DEBUG") or os.environ.get("V"):
|
|
loud = True
|
|
|
|
# No options or anything for now, but I guess
|
|
# you'll figure that out when you run --help.
|
|
parser = argparse.ArgumentParser(
|
|
prog="vendor",
|
|
description="QEMU python vendoring utility",
|
|
)
|
|
parser.parse_args()
|
|
|
|
packages = {
|
|
"meson==1.11.1":
|
|
"9b3a023657e393dbc5335b95c561337d49b7a458f5541e47ec44f2cc566e0d80",
|
|
"qemu.qmp==0.0.5":
|
|
"e05782d6df5844b34e0d2f7c68693525da074deef7b641c1401dda6e4e3d6303",
|
|
"pycotap==1.3.1":
|
|
"1c3a25b3ff89e48f4e00f1f71dbbc1642b4f65c65d416524d07e73492fff25ea",
|
|
}
|
|
|
|
vendor_dir = Path(__file__, "..", "..", "wheels").resolve()
|
|
|
|
with tempfile.NamedTemporaryFile(mode="w", encoding="utf-8") as file:
|
|
for dep_spec, checksum in packages.items():
|
|
print(f"{dep_spec} --hash=sha256:{checksum}", file=file)
|
|
file.flush()
|
|
|
|
cli_args = [
|
|
"pip",
|
|
"download",
|
|
"--dest",
|
|
str(vendor_dir),
|
|
"--require-hashes",
|
|
"-r",
|
|
file.name,
|
|
]
|
|
if loud:
|
|
cli_args.append("-v")
|
|
|
|
print(" ".join(cli_args))
|
|
subprocess.run(cli_args, check=True)
|
|
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|