[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 4/8] meson: replace Perl usage with Python
From: |
marcandre . lureau |
Subject: |
[PATCH v3 4/8] meson: replace Perl usage with Python |
Date: |
Tue, 10 Jan 2023 12:02:42 +0400 |
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>
---
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.39.0
- [PATCH v3 0/8] Fix win32/msys2 shader compilation & update lcitool deps, marcandre . lureau, 2023/01/10
- [PATCH v3 1/8] build-sys: fix crlf-ending C code, marcandre . lureau, 2023/01/10
- [PATCH v3 2/8] .gitlab-ci.d/windows: do not disable opengl, marcandre . lureau, 2023/01/10
- [PATCH v3 3/8] configure: replace Perl usage with sed, marcandre . lureau, 2023/01/10
- [PATCH v3 4/8] meson: replace Perl usage with Python,
marcandre . lureau <=
- [PATCH v3 5/8] docs: drop texinfo options, marcandre . lureau, 2023/01/10
- [PATCH v3 6/8] Update lcitool and fedora to 37, marcandre . lureau, 2023/01/10
- [PATCH v3 7/8] lcitool: drop perl from QEMU project/dependencies, marcandre . lureau, 2023/01/10
- [PATCH v3 8/8] lcitool: drop texinfo from QEMU project/dependencies, marcandre . lureau, 2023/01/10
- Re: [PATCH v3 0/8] Fix win32/msys2 shader compilation & update lcitool deps, Alex Bennée, 2023/01/10