From nobody Wed May 14 21:28:27 2025 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.zohomail.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 1515689216012427.8407311817059; Thu, 11 Jan 2018 08:46:56 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA70C780F7; Thu, 11 Jan 2018 16:46:43 +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 239025D70B; Thu, 11 Jan 2018 16:46:43 +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 3166B1800B65; Thu, 11 Jan 2018 16:46:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0BGhp9v010798 for ; Thu, 11 Jan 2018 11:43:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id CF78F9092; Thu, 11 Jan 2018 16:43:51 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8DCA909A; Thu, 11 Jan 2018 16:43:50 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:37 +0000 Message-Id: <20180111164339.7788-6-berrange@redhat.com> In-Reply-To: <20180111164339.7788-1-berrange@redhat.com> References: <20180111164339.7788-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH python 5/7] Adapt to rename of py2 RPMs from python- to python2- prefix 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 11 Jan 2018 16:46:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel P. Berrange Reviewed-by: Pavel Hrdina --- libvirt-python.spec.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index b667ebe..cc5a5a5 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -18,6 +18,12 @@ %define _with_python3 1 %endif =20 +# Whether py2 packages are assumed to have python2- name prefix +%define py2_versioned_deps 0 +%if 0%{?fedora} || 0%{?rhel} > 7 +%define py2_versioned_deps 1 +%endif + %{!?with_python2: %define with_python2 %{_with_python2}} %{!?with_python3: %define with_python3 %{_with_python3}} =20 @@ -31,10 +37,16 @@ License: LGPLv2+ Group: Development/Libraries BuildRequires: libvirt-devel >=3D @C_VERSION@ %if %{with_python2} +%if %{py2_versioned_deps} +BuildRequires: python2-devel +BuildRequires: pyth2on2-nose +BuildRequires: python2-lxml +%else BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-lxml %endif +%endif %if %{with_python3} BuildRequires: python3-devel BuildRequires: python3-nose --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list