1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00

Update README file contents and add HACKING file

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@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-11-25 17:16:11 +00:00
parent cabb24db9f
commit 409273ad3e
2 changed files with 66 additions and 20 deletions

36
HACKING Normal file
View File

@ -0,0 +1,36 @@
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 the location shown by pkg-config, with
this command:
$ 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 directly
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 generator 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

50
README
View File

@ -1,27 +1,37 @@
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.
This code is distributed under the terms of the LGPL version
2 or later.
The module can be built by following the normal python module
build process
python setup.py build
sudo python setup.py install
or to install as non-root
python setup.py build
python setup.py install --user
Manually written files:
Patches for this code should be sent to the main libvirt
development mailing list
- 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
http://libvirt.org/contact.html#email
To send patches, it is strongly recommended to use the
'git send-email' command.
Auto-generated files:
Make sure the mails mention that the patch is for the python
binding. This can be done by setting a config parameter in the
local git checkout
- 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
git config format.subjectprefix "PATCH python"