[Libguestfs] [PATCH] v2v: -o rhv-upload: Allow configure commands to set the Python version.

Richard W.M. Jones rjones at redhat.com
Sat Jan 12 12:18:41 UTC 2019


On Fri, Jan 11, 2019 at 05:27:59PM +0100, Pino Toscano wrote:
> On Tuesday, 8 January 2019 13:29:47 CET Richard W.M. Jones wrote:
> > No functional change, but it does allow downstream distributions to
> > adjust the Python interpreter and nbdkit Python plugin used by
> > virt-v2v -o rhv-upload mode:
> > 
> > ./configure --with-virt-v2v-python-interpreter=...
> 
> What is the use case for this? The documentation for the variable in
> config.mli says:
> 
> > +val virt_v2v_python_interpreter : string
> > +(** Return the name of the Python interpreter used to run scripts by
> > +    [virt-v2v -o rhv-upload].
> > +
> > +    This must normally be a Python 3 interpreter.  However some
> > +    downstream distributions replace the Python 3 scripts with Python
> > +    2 scripts and use the following configure option to adjust this
> > +    interpreter accordingly:
> > +
> > +    [./configure --with-virt-v2v-python-interpreter=...] *)
> 
> To support Python 2 way more changes are needed though, other than the
> interpreter, so patching one line more in python_script.ml is not a big
> deal in that case.

I expect there will be some distros where the Python 3 interpreter is
called "python" (or something else odd).  In any case you are right
that this doesn't by any means cover all the changes required for
Python 2.

> > ./configure --with-virt-v2v-nbdkit-python-plugin=...
> 
> This would be OKish, although needed because of downstream changes in
> Fedora (where the Python plugin of nbdkit is built also as Python 3,
> and this version is renamed to "python3").

I wish one day we will be able to get rid of this hack :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list