mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-14 05:16:18 +01:00
8f975d07f3
The check-missing-install-tag.py script breaks PEP8, and the style check CI job complains about it.
29 lines
672 B
Python
Executable File
29 lines
672 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
"""
|
|
This script checks Meson configuration logs to verify no installed file is
|
|
missing installation tag.
|
|
"""
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("builddir", type=Path)
|
|
args = parser.parse_args()
|
|
|
|
logfile = args.builddir / "meson-logs" / "meson-log.txt"
|
|
with logfile.open(encoding="utf-8") as f:
|
|
if "Failed to guess install tag" in f.read():
|
|
print(
|
|
f"Some files are missing install_tag, see {logfile} for details." # no-qa
|
|
)
|
|
return 1
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
exit(main())
|