[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/35] meson: replace Perl usage with Python
From: |
Alex Bennée |
Subject: |
[PATCH v2 07/35] meson: replace Perl usage with Python |
Date: |
Tue, 24 Jan 2023 18:00:59 +0000 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Let's try to remove Perl usage during build time.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230110132700.833690-5-marcandre.lureau@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/qapi-schema/meson.build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index 9dfe98bc9a..d85b14f28c 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -259,22 +259,23 @@ if build_docs
# Fix possible inconsistency in line endings in generated output and
# in the golden reference (which could otherwise cause test failures
# on Windows hosts). Unfortunately diff --strip-trailing-cr
- # is GNU-diff only. The odd-looking perl is because we must avoid
+ # is GNU-diff only. The odd-looking python is because we must avoid
# using an explicit '\' character in the command arguments to
# a custom_target(), as Meson will unhelpfully replace it with a '/'
# (https://github.com/mesonbuild/meson/issues/1564)
+ remove_cr = [python, '-c', 'import
sys;[sys.stdout.write(line.replace(chr(13), "")) for line in sys.stdin]']
qapi_doc_out_nocr = custom_target('QAPI rST doc newline-sanitized',
output: ['doc-good.txt.nocr'],
input: qapi_doc_out[0],
build_by_default: true,
- command: ['perl', '-pe', '$x = chr 13;
s/$x$//', '@INPUT@'],
+ command: [remove_cr, '@INPUT@'],
capture: true)
qapi_doc_ref_nocr = custom_target('QAPI rST doc reference newline-sanitized',
output: ['doc-good.ref.nocr'],
input: files('doc-good.txt'),
build_by_default: true,
- command: ['perl', '-pe', '$x = chr 13;
s/$x$//', '@INPUT@'],
+ command: [remove_cr, '@INPUT@'],
capture: true)
test('QAPI rST doc', diff, args: ['-u', qapi_doc_ref_nocr[0],
qapi_doc_out_nocr[0]],
--
2.34.1
- [PATCH v2 01/35] scripts/ci: update gitlab-runner playbook to use latest runner, (continued)
- [PATCH v2 01/35] scripts/ci: update gitlab-runner playbook to use latest runner, Alex Bennée, 2023/01/24
- [PATCH v2 05/35] build-sys: fix crlf-ending C code, Alex Bennée, 2023/01/24
- [PATCH v2 04/35] tests/unit: drop hacky race avoidance in test-io-channel-command, Alex Bennée, 2023/01/24
- [PATCH v2 08/35] docs: drop texinfo options, Alex Bennée, 2023/01/24
- [PATCH v2 02/35] gitlab: add FF_SCRIPT_SECTIONS for timings, Alex Bennée, 2023/01/24
- [PATCH v2 12/35] lcitool: drop texinfo from QEMU project/dependencies, Alex Bennée, 2023/01/24
- [PATCH v2 11/35] lcitool: drop perl from QEMU project/dependencies, Alex Bennée, 2023/01/24
- [PATCH v2 07/35] meson: replace Perl usage with Python,
Alex Bennée <=
- [PATCH v2 09/35] gitlab: add lsan suppression file to workaround tcmalloc issues, Alex Bennée, 2023/01/24
- [PATCH v2 10/35] Update lcitool and fedora to 37, Alex Bennée, 2023/01/24
- [PATCH v2 26/35] cpu: free cpu->tb_jmp_cache with RCU, Alex Bennée, 2023/01/24
- [PATCH v2 14/35] tests/docker: drop debian-tricore-cross's partial status, Alex Bennée, 2023/01/24
- [PATCH v2 22/35] docs: add an introduction to the system docs, Alex Bennée, 2023/01/24
- [PATCH v2 13/35] tests/docker: Install flex in debian-tricore-cross, Alex Bennée, 2023/01/24
- [PATCH v2 24/35] semihosting: add O_BINARY flag in host_open for NT compatibility, Alex Bennée, 2023/01/24