On Mon, Jan 07, 2019 at 08:08:05PM +0000, Richard W.M. Jones wrote:
On Mon, Jan 07, 2019 at 04:41:17PM +0100, Pino Toscano wrote:
> One option I see is to export, as part of the nbdkit Python module
> interface, the equivalent of sys.version_info: this way, the scripts
> can detect which python version is the plugin linked with:
nbdkit >= 1.8 exports the Python version in ‘--dump-plugin’ output:
$ nbdkit python --dump-plugin
...
python_version=2.7.15
And where it's available, the PEP-384 ABI version:
$ nbdkit python3 --dump-plugin
...
python_version=3.7.2
python_pep_384_abi_version=3
I will try to see if we can parse this easily ...
I started to write something along these lines and I hate it already.
However then I wondered: shouldn't all of this be ./configure options,
eg:
./configure --with-virt-v2v-python-interpreter=/usr/bin/python3 \
--with-virt-v2v-nbdkit-python=python3
or something similar?
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/