From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> The previous README file from the python code is more like a HACKING file. Rename it and update the content. Then add a basic README file Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- HACKING | 37 +++++++++++++++++++++++++++++++++++++ README | 41 +++++++++++++++++++++-------------------- 2 files changed, 58 insertions(+), 20 deletions(-) create mode 100644 HACKING diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..b0f037f --- /dev/null +++ b/HACKING @@ -0,0 +1,37 @@ + libvirt Python Bindings Hacking + =============================== + +Most of the libvirt python binding code is automatically generated +using the script generator.py, and the API description that the +libvirt library installs into /usr/share (or wherever the following +command says. + + $ pkg-config --variable libvirt_api libvirt + /usr/share/libvirt/api/libvirt-api.xml + + +Some of the API descriptions in the primary XML files are not directlry +usable by the code generator. Thus there are overrides in + + - libvirt-override-api.xml + - libvirt-qemu-override-api.xml + - libvirt-lxc-override-api.xml + +For stuff which the genrator can't cope with at all there are some +hand written source files + + - libvirt-override.c - low level binding to libvirt.so + - libvirt-qemu-override.c - low level binding to libvirt-qemu.so + - libvirt-lxc-override.c - low level binding to libvirt-lxc.so + + - libvirt-override.py - high level overrides in the global namespace + - libvirt-override-virConnect.py - high level overrides in + the virConnect class + - libvirt-override-virDomain.py - high level overrides in + the virDomain class + - libvirt-override-virDomainSnapshot.py - high level overrides in + the virDomainSnapshot class + - libvirt-override-virStoragePool.py - high level overrides in + the virStoragePool class + - libvirt-override-virStream.py - high level overrides in + the virStream class diff --git a/README b/README index 02d4cc4..cadd2e4 100644 --- a/README +++ b/README @@ -1,27 +1,28 @@ - libvirt Python Bindings README - ============================== + Libvirt Python Binding README + ============================= -Most of the libvirt python binding code is automatically generated -using the script generator.py, and the API description from -docs/libvirt-api.xml +This package provides a python binding to the libvirt.so, +libvirt-qemu.so and libvirt-lxc.so library APIs. +It is written to build against any version of libvirt that +is 0.9.11 or newer. -Manually written files: +This code is distributed under the terms of the LGPL version +2 or later. - - libvirt-override.c: methods where the C binding needs to be hand crafted - - libvirt-override.py: global methods where the C and python bindings have different args - - libvirt-override-api.xml: methods where the auto-extracted API docs are not - suitable for python auto-generator. Overriding this if the method is going - into libvirt-override.c, but we still want auto-generated libvirt-override.py - - libvirt-override-virConnect.py: virConnect class methods - - typewrappers.h,.c: Python object wrappers for each libvirt C object +The module can be built by following the normal python module +build processs + python setup.py build + sudo python setup.py install -Auto-generated files: +or to install as non-root - - libvirt.py: The main python binding. Comprises auto-generated code, along - with contents from libvirt-override.py and libvirt-override-virConnect.py - - libvirt.c, libvirt.h: The C glue layer for the python binding. Comprises - auto-generated code, along with libvirt-override.c - - libvirt-export.c: List of auto-generated C methods, included into - the libvirt-override.c method table + python setup.py build + python setup.py install --user + + +Patches for this code should be sent to the main libvirt +development mailing list + + http://libvirt.org/contact.html#email -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list