From nobody Mon Feb 9 16:02:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1619076751; cv=none; d=zohomail.com; s=zohoarc; b=ewW75N4cKx0RTDNZphS4v9DWgA/c9B0dik7p+gge10nJadkMnU8gEs/WzNGby4qlKVwDA+wvFLgw92We9rJDJhq+UkRgTGGDNdXjYw7Y6nJks6OR8jjBza6wSOcS8CEoy9ihhogeqNdcyCIl+F+JlRTxJkCYPsKJ6TSc82qZHQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619076751; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=neK/MXhElqn+a1AVh3Q3Ya0Cn+hYV2Z6FCa921XgxNs=; b=PmQ4lKuEJyvZb3wPYJQmx5bDLUeOZeWf24T4T8r9ZTeA7aa5jYJ06Il4vN7W0qmjpOjU4firpIsJ05Ow9/GGujqQ78Gv7rUGjwmFptZPi9pil6egzsQvI6Lfm5Xu+WC0iwJcewNcXT6Isdsz6UQmhqr/F9/PDyyUiPrtOZVGQWc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1619076751109208.97919896535007; Thu, 22 Apr 2021 00:32:31 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-470-OIaczgzaMeWp4uiqwqZXGA-1; Thu, 22 Apr 2021 03:32:26 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 643B1107ACF5; Thu, 22 Apr 2021 07:32:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 428E76061F; Thu, 22 Apr 2021 07:32:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 050B21806D21; Thu, 22 Apr 2021 07:32:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13M7VUUP023790 for ; Thu, 22 Apr 2021 03:31:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6336820BC8D5; Thu, 22 Apr 2021 07:31:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D7AC20BC8CF for ; Thu, 22 Apr 2021 07:31:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA05585338A for ; Thu, 22 Apr 2021 07:31:28 +0000 (UTC) Received: from m97136.mail.qiye.163.com (m97136.mail.qiye.163.com [220.181.97.136]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-521-1d4z18ClOked2dGpq3ONSg-1; Thu, 22 Apr 2021 03:31:22 -0400 Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp2 (Coremail) with SMTP id iOCowAA3HLYJJYFgMwTJAQ--.5876S4; Thu, 22 Apr 2021 15:26:04 +0800 (CST) X-MC-Unique: OIaczgzaMeWp4uiqwqZXGA-1 X-MC-Unique: 1d4z18ClOked2dGpq3ONSg-1 From: Shi Lei To: libvir-list@redhat.com Subject: [RFCv3 02/25] maint: Check python3-clang and libclang Date: Thu, 22 Apr 2021 15:25:10 +0800 Message-Id: <20210422072533.312211-3-shi_lei@massclouds.com> In-Reply-To: <20210422072533.312211-1-shi_lei@massclouds.com> References: <20210422072533.312211-1-shi_lei@massclouds.com> MIME-Version: 1.0 X-CM-TRANSID: iOCowAA3HLYJJYFgMwTJAQ--.5876S4 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjfULt8eDUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbifgx8T1rpO2KmjwAAsC X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Shi Lei X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make sure 'python3-clang' and 'libclang' have been installed and can work. Also, add 'python3-clang' into libvirt.spec.in and mingw-libvirt.spec.in. Signed-off-by: Shi Lei --- libvirt.spec.in | 1 + meson.build | 10 ++++++++++ mingw-libvirt.spec.in | 1 + 3 files changed, 12 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index be74964b..4ebd67ce 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -277,6 +277,7 @@ BuildRequires: perl-interpreter BuildRequires: perl %endif BuildRequires: python3 +BuildRequires: python3-clang BuildRequires: systemd-units %if %{with_libxl} BuildRequires: xen-devel diff --git a/meson.build b/meson.build index 837955de..a99be250 100644 --- a/meson.build +++ b/meson.build @@ -2406,3 +2406,13 @@ if conf.has('WITH_QEMU') } summary(priv_summary, section: 'Privileges') endif + +py3_clang =3D run_command('python3', '-c', 'import clang.cindex;print("ok"= )') +if py3_clang.returncode() !=3D 0 + error('python3-clang is required.') +endif + +py3_clang_working =3D run_command('python3', '-c', 'import clang.cindex;cl= ang.cindex.Index.create()') +if py3_clang_working.returncode() !=3D 0 + error('python3-clang is present, but not working. Perhaps libclang is mi= ssing?') +endif diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in index 288f533d..00b54d4a 100644 --- a/mingw-libvirt.spec.in +++ b/mingw-libvirt.spec.in @@ -52,6 +52,7 @@ BuildRequires: pkgconfig BuildRequires: gettext BuildRequires: libxslt BuildRequires: python3 +BuildRequires: python3-clang BuildRequires: perl-interpreter BuildRequires: perl(Getopt::Long) BuildRequires: meson --=20 2.25.1