From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515689160129382.5885578296417; Thu, 11 Jan 2018 08:46:00 -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 225AE12E4F2; Thu, 11 Jan 2018 16:45: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 4EF105D70B; Thu, 11 Jan 2018 16:45:42 +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 E66931800B64; Thu, 11 Jan 2018 16:45:39 +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 w0BGhkMG010758 for ; Thu, 11 Jan 2018 11:43:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6146C909B; Thu, 11 Jan 2018 16:43:46 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9273363F8F; Thu, 11 Jan 2018 16:43:45 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:33 +0000 Message-Id: <20180111164339.7788-2-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 1/7] Allow disabling of python2 RPM 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 11 Jan 2018 16:45:54 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" With Fedora modularity, it is possible to have add-on repos for multiple versions of python3. It is thus desirable to be able to build libvirt-python in these repos, with only the python3 sub-RPMs enabled. Thus also helps if future RHEL/Fedora drop python2 entirely from their defa= ult repos. Signed-off-by: Daniel P. Berrange --- libvirt-python.spec.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 4d0262d..5bbebeb 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -1,4 +1,5 @@ =20 +%define with_python2 1 %define with_python3 0 %if 0%{?fedora} %define with_python3 1 @@ -13,9 +14,11 @@ Url: http://libvirt.org License: LGPLv2+ Group: Development/Libraries BuildRequires: libvirt-devel >=3D @C_VERSION@ +%if %{with_python2} BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-lxml +%endif %if %{with_python3} BuildRequires: python3-devel BuildRequires: python3-nose @@ -32,6 +35,7 @@ written in the Python programming language to use the int= erface supplied by the libvirt library to use the virtualization capabilities of recent versions of Linux (and other OSes). =20 +%if %{with_python2} %package -n python2-libvirt Summary: The libvirt virtualization API python2 binding Url: http://libvirt.org @@ -46,6 +50,7 @@ The python2-libvirt package contains a module that permit= s applications written in the Python programming language to use the interface supplied by the libvirt library to use the virtualization capabilities of recent versions of Linux (and other OSes). +%endif =20 %if %{with_python3} %package -n python3-libvirt @@ -73,23 +78,30 @@ of recent versions of Linux (and other OSes). find examples -type f -exec chmod 0644 \{\} \; =20 %build +%if %{with_python2} CFLAGS=3D"$RPM_OPT_FLAGS" %{__python} setup.py build +%endif %if %{with_python3} CFLAGS=3D"$RPM_OPT_FLAGS" %{__python3} setup.py build %endif =20 %install +%if %{with_python2} %{__python} setup.py install --skip-build --root=3D%{buildroot} +%endif %if %{with_python3} %{__python3} setup.py install --skip-build --root=3D%{buildroot} %endif =20 %check +%if %{with_python2} %{__python} setup.py test +%endif %if %{with_python3} %{__python3} setup.py test %endif =20 +%if %{with_python2} %files -n python2-libvirt %defattr(-,root,root) %doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/ @@ -98,6 +110,7 @@ CFLAGS=3D"$RPM_OPT_FLAGS" %{__python3} setup.py build %{_libdir}/python2*/site-packages/libvirt_lxc.py* %{_libdir}/python2*/site-packages/libvirtmod* %{_libdir}/python2*/site-packages/*egg-info +%endif =20 %if %{with_python3} %files -n python3-libvirt --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515689147990866.1536103050487; Thu, 11 Jan 2018 08:45:47 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 6DAA59F735; Thu, 11 Jan 2018 16:45:17 +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 7174567648; Thu, 11 Jan 2018 16:45:14 +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 9D6CD1800B64; Thu, 11 Jan 2018 16:45:09 +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 w0BGhlIm010768 for ; Thu, 11 Jan 2018 11:43:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id D5FE39CA9; Thu, 11 Jan 2018 16:43:47 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9D239CAC; Thu, 11 Jan 2018 16:43:46 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:34 +0000 Message-Id: <20180111164339.7788-3-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 2/7] Allow override of which sub-RPMs to 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 11 Jan 2018 16:45:44 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow using rpmbuild --define "with_python2 0" to override the default logic about which python sub-RPMs to build Signed-off-by: Daniel P. Berrange Reviewed-by: Pavel Hrdina --- libvirt-python.spec.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 5bbebeb..1619e26 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -1,10 +1,13 @@ =20 -%define with_python2 1 -%define with_python3 0 +%define _with_python2 1 +%define _with_python3 0 %if 0%{?fedora} -%define with_python3 1 +%define _with_python3 1 %endif =20 +%{!?with_python2: %define with_python2 %{_with_python2}} +%{!?with_python3: %define with_python3 %{_with_python3}} + Summary: The libvirt virtualization API python2 binding Name: libvirt-python Version: @PY_VERSION@ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515689177628865.3045195804938; Thu, 11 Jan 2018 08:46:17 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C1BEB7AEBC; Thu, 11 Jan 2018 16:46:15 +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 B13D060CAA; Thu, 11 Jan 2018 16:46:11 +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 294611800B66; Thu, 11 Jan 2018 16:46:10 +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 w0BGhn7J010775 for ; Thu, 11 Jan 2018 11:43:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 78CF26017B; Thu, 11 Jan 2018 16:43:49 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DB8C9098; Thu, 11 Jan 2018 16:43:48 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:35 +0000 Message-Id: <20180111164339.7788-4-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 3/7] Add checks for min supported distros 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 11 Jan 2018 16:46:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Be clear about which distros we aim to support with the specfile, so we know what we can cleanup in the spec later. Signed-off-by: Daniel P. Berrange --- libvirt-python.spec.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 1619e26..a98b902 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -1,3 +1,14 @@ +# This spec file assumes you are building on a Fedora or RHEL version +# that's still supported by the vendor. It may work on other distros +# or versions, but no effort will be made to ensure that going forward +%define min_rhel 6 +%define min_fedora 25 + +%if (0%{?fedora} && 0%{?fedora} >=3D %{min_fedora}) || (0%{?rhel} && 0%{?r= hel} >=3D %{min_rhel}) + %define supported_platform 1 +%else + %define supported_platform 0 +%endif =20 %define _with_python2 1 %define _with_python3 0 @@ -81,6 +92,11 @@ of recent versions of Linux (and other OSes). find examples -type f -exec chmod 0644 \{\} \; =20 %build +%if ! %{supported_platform} +echo "This RPM requires either Fedora >=3D %{min_fedora} or RHEL >=3D %{mi= n_rhel}" +exit 1 +%endif + %if %{with_python2} CFLAGS=3D"$RPM_OPT_FLAGS" %{__python} setup.py build %endif --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151568914878513.865649047816646; Thu, 11 Jan 2018 08:45:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 958B1C07F9B4; Thu, 11 Jan 2018 16:45:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0DD75C66F; Thu, 11 Jan 2018 16:45:42 +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 BC3593FB18; Thu, 11 Jan 2018 16:45:41 +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 w0BGhol0010787 for ; Thu, 11 Jan 2018 11:43:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id 662A99092; Thu, 11 Jan 2018 16:43:50 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD8C86017B; Thu, 11 Jan 2018 16:43:49 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:36 +0000 Message-Id: <20180111164339.7788-5-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 4/7] Add emacs mode marker to activate rpm-spec highlighting 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 11 Jan 2018 16:45:47 +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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index a98b902..b667ebe 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -1,3 +1,5 @@ +# -*- rpm-spec -*- + # This spec file assumes you are building on a Fedora or RHEL version # that's still supported by the vendor. It may work on other distros # or versions, but no effort will be made to ensure that going forward --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:05:31 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 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 From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515689180245647.4110662056825; Thu, 11 Jan 2018 08:46:20 -0800 (PST) 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 36A4D12E4F5; Thu, 11 Jan 2018 16:46:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1985117D19; Thu, 11 Jan 2018 16:46:11 +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 ED65C3FB1C; Thu, 11 Jan 2018 16:46:09 +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 w0BGhqkt010808 for ; Thu, 11 Jan 2018 11:43:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id DE9369092; Thu, 11 Jan 2018 16:43:52 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 237499096; Thu, 11 Jan 2018 16:43:51 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:38 +0000 Message-Id: <20180111164339.7788-7-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 6/7] Turn on python3 sub-RPMs for RHEL > 7 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.38]); Thu, 11 Jan 2018 16:46:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It is expected that future RHEL-8 will have python3 by default, so enable t= hat. It is unclear whether python2 will still be available, so leave that enabled for now. Signed-off-by: Daniel P. Berrange Reviewed-by: Pavel Hrdina --- libvirt-python.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index cc5a5a5..0087c78 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -14,7 +14,7 @@ =20 %define _with_python2 1 %define _with_python3 0 -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} > 7 %define _with_python3 1 %endif =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:05:31 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151568923858713.040001242794574; Thu, 11 Jan 2018 08:47:18 -0800 (PST) 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 05B2212E4F4; Thu, 11 Jan 2018 16:47:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E6C263F8F; Thu, 11 Jan 2018 16:47:15 +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 521B43FB1A; Thu, 11 Jan 2018 16:47:13 +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 w0BGhsP1010813 for ; Thu, 11 Jan 2018 11:43:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1860D6017B; Thu, 11 Jan 2018 16:43:54 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 426E89096; Thu, 11 Jan 2018 16:43:53 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:39 +0000 Message-Id: <20180111164339.7788-8-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 7/7] Require libvirt native version matching py version by default 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 11 Jan 2018 16:47:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Although we're capable of building against any libvirt >=3D 0.9.11, 99% of = the time we want RPM builds to be done against matching libvirt version, otherw= ise we might silently build against an unexpected/wrong version. Signed-off-by: Daniel P. Berrange --- libvirt-python.spec.in | 2 +- setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 0087c78..6afa6f8 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -35,7 +35,7 @@ Source0: http://libvirt.org/sources/python/%{name}-%{vers= ion}.tar.gz Url: http://libvirt.org License: LGPLv2+ Group: Development/Libraries -BuildRequires: libvirt-devel >=3D @C_VERSION@ +BuildRequires: libvirt-devel >=3D %{version} %if %{with_python2} %if %{py2_versioned_deps} BuildRequires: python2-devel diff --git a/setup.py b/setup.py index 85af965..5e29c8a 100755 --- a/setup.py +++ b/setup.py @@ -175,8 +175,7 @@ class my_sdist(sdist): f2 =3D open('libvirt-python.spec', 'w') for line in f1: f2.write(line - .replace('@PY_VERSION@', self.distribution.get_versio= n()) - .replace('@C_VERSION@', MIN_LIBVIRT)) + .replace('@PY_VERSION@', self.distribution.get_versio= n())) f1.close() f2.close() =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list