From patchwork Thu Jan 26 11:22:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 647113 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp188768pvb; Thu, 26 Jan 2023 03:32:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdhTMB4Rlwd4YNw1Fo0lL36C6n06xnGo5QiztQI1B60y9FfGR2ZkyGYIdPfqvPKPQNaf+B X-Received: by 2002:a05:6214:4382:b0:535:65cd:77f with SMTP id oh2-20020a056214438200b0053565cd077fmr32278224qvb.32.1674732728101; Thu, 26 Jan 2023 03:32:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674732728; cv=none; d=google.com; s=arc-20160816; b=vbGSaW786L/F87w/4t33zuyTukb6xmI8BWSEQi4lRrlCBdHWc3cTkjUZA6kfRGGD+z k1gAPdn+cnWgLAkfPr+L1c6UW4W8QrX6RrKocBQ9AgAio0c2+FOgaCtMvxnudsIzUR1P NDgE0m/YzW0Si9BwgdMraj7B3vHiFnztOEEIhP/0uRJvn+XiCJPuTujc0ti66U19s2vb BNAE87EC5TygkQrDfFFTsxIaEAygBRLHVquMrvxkOmQOKUhYzg5LTPYlX4g51p65Zopb 1/JE5v/AxdjjexyvD1QgcttXiDkGtUmxBXDToC7Rf2u3YVvNNP/1Lfr40yT8ZTbAL8gR ibkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zhJ2RCjWEhtNjzcA/iBMZ7sQCLCU1u/N4bQ1NIk6DxA=; b=tF14K5/VesGgIm4GbndljDCC6K23/I3+JUdBKsOm99K3sybnHIUcK4TSGbZtc8/dIU Dkw5KbZF0dyvpOqRO3238DgcCHNEz4tHwCujZ3ytCzkq7YSoJcpObRmnDEDF/32KoovU 1l0NxkGvWIJhto/Z3itLMU/UN8mUANRh8+c3c1pOVPZJqXMrc+a7g8YsUjjQHe6EFu+4 YGvNVqEceFQ+3tKUpF8QuUmYiLduAHVvYOcTE0f2aZkO/kTHq4LxC7p5JWJENPsTZ3Sj /8J7PrhlyBgwK+f0QWsSlHzbl6xqdT6XSylrgiBSnpG4gDhhliGwOoAx1RhP83LTQzZt uKIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uEGNgkv/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n6-20020a0cdc86000000b00535223d0e07si654992qvk.49.2023.01.26.03.32.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jan 2023 03:32:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uEGNgkv/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pL0LP-0002US-RV; Thu, 26 Jan 2023 06:23:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pL0LN-0002BH-7j for qemu-devel@nongnu.org; Thu, 26 Jan 2023 06:23:01 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pL0LL-0003ok-2I for qemu-devel@nongnu.org; Thu, 26 Jan 2023 06:23:00 -0500 Received: by mail-wm1-x32f.google.com with SMTP id l8so900828wms.3 for ; Thu, 26 Jan 2023 03:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zhJ2RCjWEhtNjzcA/iBMZ7sQCLCU1u/N4bQ1NIk6DxA=; b=uEGNgkv/Xqobs6kufgia/0IH0K/46chO9SJ3m0INMnv/o0gBimhDYUbMSI1VHYWf/y J7ova60lspvCG++JFNzOymdbCOOSswQnDHQzwGCCRHHp74yK/shcJPGm9jtFAwvzvB2b jIRX5U5P/OWt3llxISXNK0W47wQ+v5N8mi7duBEsDahoB7pxp4t5mfmZeux4HZ8eUw9N J9xqmL/60pIQfZYlYlY8KZFBDB+HD71RNYDVu210hgtN7lUGGnl5IJpAbE5osjo0RlwV aLpMFS5BtbA1xnFKWFkjWtn04RKuj3SZWhF5INkc1pneq4zeZXC6S1E0dk+ApMdQv+1c aR2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zhJ2RCjWEhtNjzcA/iBMZ7sQCLCU1u/N4bQ1NIk6DxA=; b=zU5TGfzM72Hit1M5qwDMf5nbemqVRmSabs02ttinkFI7V993FySYdyTIASKT6xHGyr kOAM8jvWcGO2ib71EW/bSOjjHxXey2TP0yfD1SKNPaFRgufy9AtflOL7avdMmS5wdaC4 piXK/uwnnxwBjIPluh4/3QsqWJW+bZE7Z0Dfx3kgOF37xcdog93qMrdfLi7QE7HvymTJ 8D7y6hSAND48sQU0IiH3ZV9+Dk0XGf3TLLt5uyu3mj/nZD/pi+3zp561aZ29b+4sHfO0 HHmn/s2AbZi7hLYuBCQxcsjOXKxV4mfk838WB8/OcP0WKjP4MF3sPiwuUzLol5FYO7Ai HNZg== X-Gm-Message-State: AFqh2kor1xL6Kn3oN6kOi3CVlCpr63n26PwunRJ4aOVVMyIRWf/+3VW1 45pFLSPcRK/zVtgG1/2FwVAelg== X-Received: by 2002:a05:600c:358b:b0:3db:2e6e:7826 with SMTP id p11-20020a05600c358b00b003db2e6e7826mr23963578wmq.5.1674732177540; Thu, 26 Jan 2023 03:22:57 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id d1-20020adfe2c1000000b002bfba730b0fsm1031981wrj.65.2023.01.26.03.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 03:22:55 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 70FAE1FFBA; Thu, 26 Jan 2023 11:22:52 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , Markus Armbruster , Michael Roth Subject: [PULL 07/35] meson: replace Perl usage with Python Date: Thu, 26 Jan 2023 11:22:22 +0000 Message-Id: <20230126112250.2584701-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126112250.2584701-1-alex.bennee@linaro.org> References: <20230126112250.2584701-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Marc-André Lureau Let's try to remove Perl usage during build time. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230110132700.833690-5-marcandre.lureau@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20230124180127.1881110-8-alex.bennee@linaro.org> 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]],