Import VIR_ALLOC / VIR_ALLOC_N / VIR_REALLOC_N functions

Import the libvirt memory allocation functions, stripping the OOM
testing and error reporting pieces.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Remove use of virStrcpyStatic

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Import VIR_FORCE_CLOSE macro from libvirt

Import the macro for safely closing file descriptors

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Import LIBVIR_CHECK_VERSION macro from libvirt

Add LIBVIR_CHECK_VERSION from libvirt upstream so that we can check the
version of the library we are compiling against and support a range of
libvirt versions. The macro was added to libvirt in 1.2.0 so we must
provide it if its not defined.
Import some virTypedParams* APIs from libvirt

virTypedParamsClear() and virTypedParamsFree() were introduced in
libvirt 1.0.2. In an effort to keep the code clean bring these two
functions to libvirt-python if we're building against a version of
libvirt that's older than 1.0.2
Add build/ to python module path for sanitytest.py

The generated libvirt.py modules will be in the build/
directory, so santitytest.py must use that directory.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add execute permission for sanitytest.py

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Setup distutils build system

Create a setup.py for building libvirt python code and add
supporting files

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add missing attributes to setup.py

setup.py needs a URL attribute that contains the project's website which
is set to http://libvirt.org as well as information about a maintainer
which is set to 'Libvirt Maintainers' and points to the libvirt mailing
list.
Break generator.py to be called per module

Since we don't always want to build all the modules, and there might be
more modules added in the future but we want to retain backwards
compatibility with older libvirts, change generator.py to be called once
per module instead of with all modules at once.
Create array of modules to be built

Create an array of modules to be built to allow for flexibility to
enable or disable some modules in the future and allow for additional
modules to be added easily
Don't build LXC module when building less than 1.0.2

The functions that the LXC module wraps did not appear until 1.0.2 so we
can't build the module unless we're building against 1.0.2 or newer.
virDomainSnapshotListChildrenNames API appeared in 0.9.7
virDomain{Get,Set}BlockIoTune APIs appeared in 0.9.8
virDomain{Get,Set}InterfaceParameters APIs appeared in 0.9.9
virDomain{Get,Set}NumaParameters APIs appeared in 0.9.9
virDomainGetCPUStats API appeared in 0.9.10
virDomainGetDiskErrors API appeared in 0.9.10
virDomainListAllSnapshots API appeared in 0.9.13
virConnectListAllDomains API appeared in 0.9.13