This patch series is a follow up to: https://www.redhat.com/archives/libvir-list/2013-November/msg00416.html https://www.redhat.com/archives/libvir-list/2013-November/msg00620.html It includes all of Dan's patches and builds on his work and incorporates all reviews from Eric. The goal is to split the Python bindings out into their own git repo. These patches do not apply to current libvirt.git. You must follow Dan's steps for creating the new repo and initialize it based on the history of the current python/ subdirectory. Assuming your current checkout of libvirt is in a directory 'libvirt', then $ git clone libvirt libvirt-python $ cd libvirt-python $ git filter-branch --subdirectory-filter python --tag-name-filter cat -- --all $ git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d $ git reflog expire --expire=now --all $ git gc --prune=now You should now have a repo that's a couple of MB in size, showing only the files from python/ dir, in the root. The tags have been re-written to show content from the python/ directory. All the GPG signatures from tags are removed, since they are invalid after rewriting history. This was previously agreed to be the right way to handle this. The build system uses python distutils instead of autoconf/automake. It still uses the code generator as before though, pulling the XML files from /usr/share/libvirt/api (or whever you installed libvirt, as indicated by pkg-config). created a simple autobuild.sh to do an end-to-end build, including the RPM generation. Or you can just do python setup.py build ('make' equiv) python setup.py test ('make check' equiv) python setup.py rpm ('make rpm' equiv) python setup.py clean ('make clean' equiv) Historically libvirt python only worked with the exact matching libvirt binary. Before releasing this, I think we need to make it possible to compile libvirt-python against any recent-ish libvirt version. This shouldn't actually be too hard - the generator will take care of most of it. All we need do is fix up the -override.c files to make use of version checks to hide APIs not present in older libvirt. The RPM is designed to be drop in compatible/identical to/with the existing libvirt-python RPM, so users should notice no difference in any way when upgrading. If you don't want to try the filter-branch steps yourself, you can clone this complete series + repo from: git clone https://github.com/cardoe/libvirt-python.git Notice how the history is intact right back to the first commit of the python bindings. NOTE: We need to pull in the following directories and this does not do that. * examples/python * examples/domain-events/events-python Daniel P. Berrange (14): Remove obsolete Makefile.am Update generator for new code layout Update header file includes Import STREQ macro from libvirt Add decl of MIN macro Import gnulib's xalloc_oversized macro Import gnulib's ignore_value macro Import code annotation macros from libvirt Import VIR_ALLOC / VIR_ALLOC_N / VIR_REALLOC_N functions Remove use of virStrcpyStatic Import VIR_FORCE_CLOSE macro from libvirt Add build/ to python module path for sanitytest.py Add execute permission for sanitytest.py Setup distutils build system Doug Goldstein (30): Import LIBVIR_CHECK_VERSION macro from libvirt Import some virTypedParams* APIs from libvirt Add missing attributes to setup.py Break generator.py to be called per module Create array of modules to be built Don't build LXC module when building less than 1.0.2 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 virDomainSnapshotListAllChildren API appeared in 0.9.13 virConnect{Unr,R}egisterCloseCallback API appeared in 0.10.0 virDomainPinEmulator and virDomainGetEmulatorPinInfo APIs appeared in 0.10.0 virConnectListAll* APIs appeared in 0.10.2 virNode{Get,Set}MemoryParameters API appeared in 0.10.2 virStoragePoolListAllVolumes API appeared in 0.10.2 VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK appeared in 1.0.0 virNodeGetCPUMap API appeared in 1.0.0 virTypedParams* API appeared in 1.0.2 virDomainGetJobStats API appeared in 1.0.3 virDomainMigrateGetCompressionCache API appeared in 1.0.3 virDomainMigrate3 and virDomainMigrateToURI3 appeared in 1.1.0 virDomainCreateXMLWithFiles and virDomainCreateWithFiles APIs appeared in 1.1.1 VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED appeared in 1.1.1 virConnectGetCPUModelNames API appeared in 1.1.3 Simplify out of memory error case .gitignore | 4 + AUTHORS.in | 12 ++ COPYING | 339 ++++++++++++++++++++++++++++++++ COPYING.LESSER | 502 ++++++++++++++++++++++++++++++++++++++++++++++++ MANIFEST.in | 27 +++ Makefile.am | 173 ----------------- NEWS | 9 + autobuild.sh | 24 +++ generator.py | 79 +++----- libvirt-lxc-override.c | 9 +- libvirt-override.c | 240 ++++++++++++++++------- libvirt-python.spec.in | 34 ++++ libvirt-qemu-override.c | 8 +- libvirt-utils.c | 181 +++++++++++++++++ libvirt-utils.h | 209 ++++++++++++++++++++ sanitytest.py | 4 + setup.py | 291 ++++++++++++++++++++++++++++ typewrappers.c | 5 +- 18 files changed, 1846 insertions(+), 304 deletions(-) create mode 100644 .gitignore create mode 100644 AUTHORS.in create mode 100644 COPYING create mode 100644 COPYING.LESSER create mode 100644 MANIFEST.in delete mode 100644 Makefile.am create mode 100644 NEWS create mode 100755 autobuild.sh create mode 100644 libvirt-python.spec.in create mode 100644 libvirt-utils.c create mode 100644 libvirt-utils.h mode change 100644 => 100755 sanitytest.py create mode 100644 setup.py -- 1.8.3.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list