From nobody Mon May 6 06:25:59 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.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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554311506053749.5993520929013; Wed, 3 Apr 2019 10:11:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 757C088AC7; Wed, 3 Apr 2019 17:11: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 846406013E; Wed, 3 Apr 2019 17:11:41 +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 EA4C3181AC42; Wed, 3 Apr 2019 17:11:38 +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 x33HBbIp027717 for ; Wed, 3 Apr 2019 13:11:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id C1F6D171BB; Wed, 3 Apr 2019 17:11:37 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3A835C8A8; Wed, 3 Apr 2019 17:11:24 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 18:11:22 +0100 Message-Id: <20190403171122.9323-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [python PATCH] rpm: use new python macros for build/install rules 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: , Content-Type: text/plain; charset="utf-8" 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 03 Apr 2019 17:11:44 +0000 (UTC) The new %py{2,3}_{build,install} macros ensure that the right compiler and linker flags are used when building python modules. Signed-off-by: Daniel P. Berrang=C3=A9 --- libvirt-python.spec.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 5bcf1eb..8dd261f 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -119,19 +119,35 @@ exit 1 %endif =20 %if %{with_python2} +%if 0%{?fedora} >=3D 29 || 0%{?rhel} >=3D 8 +%py2_build +%else CFLAGS=3D"$RPM_OPT_FLAGS" %{__python2} setup.py build %endif +%endif %if %{with_python3} +%if 0%{?fedora} >=3D 29 || 0%{?rhel} >=3D 8 +%py3_build +%else CFLAGS=3D"$RPM_OPT_FLAGS" %{__python3} setup.py build %endif +%endif =20 %install %if %{with_python2} +%if 0%{?fedora} || 0%{?rhel} >=3D 8 +%py2_install +%else %{__python2} setup.py install --skip-build --root=3D%{buildroot} %endif +%endif %if %{with_python3} +%if 0%{?fedora} || 0%{?rhel} >=3D 8 +%py3_install +%else %{__python3} setup.py install --skip-build --root=3D%{buildroot} %endif +%endif =20 %check %if %{with_python2} --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list