Re: [PATCH python] Add python3 to the automated build and RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/11/2013 09:31 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]