From nobody Thu Apr 25 15:29:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1494240271675515.7405137036862; Mon, 8 May 2017 03:44:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89A36C0467C0; Mon, 8 May 2017 10:44:29 +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 323F987421; Mon, 8 May 2017 10:44:29 +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 EB9B21800C81; Mon, 8 May 2017 10:44:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v48AiQ98000954 for ; Mon, 8 May 2017 06:44:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 30DC2171FF; Mon, 8 May 2017 10:44:26 +0000 (UTC) Received: from t460.redhat.com (ovpn-116-182.ams2.redhat.com [10.36.116.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EEAB171FC; Mon, 8 May 2017 10:44:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 89A36C0467C0 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 89A36C0467C0 From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Mon, 8 May 2017 11:44:21 +0100 Message-Id: <20170508104421.25805-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] configure: enforce presence of python for build 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 08 May 2017 10:44:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The API docs extractor, ESX code generator and keycodemapdb tools rely on python. Historically every platform that this present, but with switch to Python3 by default, we're increasingly seeing installs without a /usr/bin/python. This tightens up the check during configure, so it exits immediately if python is missing, rather than leaving an empty $(PYTHON) make variable which leads to more obscure errors later. Also add it as a build dep for Mingw, since Fedora build roots no longer get python2 by default. This was not previously a major problem, since both ESX & API generated files were included in EXTRA_DIST, but the keycodemapdb generated files are not, so we require python all the time now. Signed-off-by: Daniel P. Berrange --- configure.ac | 5 ++++- mingw-libvirt.spec.in | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5f7a07a..0b564a0 100644 --- a/configure.ac +++ b/configure.ac @@ -624,9 +624,12 @@ fi =20 dnl Allow perl/python overrides AC_PATH_PROGS([PYTHON], [python2 python]) +if test -z "$PYTHON"; then + AC_MSG_ERROR(['python' or 'python2' binary is required to build l= ibvirt]) +fi AC_PATH_PROG([PERL], [perl]) if test -z "$PERL"; then - AC_MSG_ERROR([Failed to find perl.]) + AC_MSG_ERROR(['perl' binary is required to build libvirt]) fi =20 LIBVIRT_ARG_WITH([TEST_SUITE], [build test suite by default], [check]) diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in index dec799b..302f663 100644 --- a/mingw-libvirt.spec.in +++ b/mingw-libvirt.spec.in @@ -54,6 +54,7 @@ BuildRequires: mingw64-portablexdr BuildRequires: pkgconfig # Need native version for msgfmt BuildRequires: gettext +BuildRequires: python BuildRequires: perl BuildRequires: perl(Getopt::Long) %if 0%{?enable_autotools} --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list