[libvirt] [PATCH python] Add python3 to the automated build and RPM
Eric Blake
eblake at redhat.com
Wed Dec 11 20:01:03 UTC 2013
On 12/11/2013 09:31 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> This updates autobuild.sh to test the python3 build process.
> The RPM specfile is changed to build a libvirt-python3 RPM
> on Fedora > 18
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> autobuild.sh | 6 ++++++
> libvirt-python.spec.in | 57 +++++++++++++++++++++++++++++++++++++++++++-------
> 2 files changed, 56 insertions(+), 7 deletions(-)
>
> +++ b/libvirt-python.spec.in
> @@ -1,5 +1,10 @@
>
> -Summary: The libvirt virtualization API python binding
> +%global with_python3 0
> +%if 0%{?fedora} > 18
> +%global with_python3 1
> +%endif
Is %global the right thing to use? Elsewhere we have just used %define
when setting up a variable that conditionalizes the rest of the spec file.
> %build
> -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
> +CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
How far back can we assume that %{__python2} exists? Is it going to
bite us on RHEL 6 (where I'm guessing there is just %{__python})?
> +%if %{with_python3}
> +CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
> +%endif
>
> %install
> -%{__python} setup.py install --skip-build --root=%{buildroot}
> +%{__python2} setup.py install --skip-build --root=%{buildroot}
More use of %{__python2}.
Everything else looks okay to me, although I did not actually do any
testing of the rpms.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131211/eeb3be5f/attachment-0001.sig>
More information about the libvir-list
mailing list