[PATCH libvirt-python v3 00/40] Split python binding into separate repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

This patch series is a followup to

   https://www.redhat.com/archives/libvir-list/2013-November/msg00712.html

This series is what I consider ready to declare final, ready for the real
GIT repo split to be done.

Starting from libvirt GIT master as of

  commit bae383f29194b9c61f9ab245f493ce7d654868d1
  Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
  Date:   Fri Nov 22 14:32:23 2013 +0000

I did the following

  $ git clone libvirt libvirt-python
  $ cd libvirt-python
  $ git mv examples/python python/examples
  $ git mv examples/domain-events/events-python/event-test.py python/examples
  $ git commit
  $ 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

Then applied the following 40 patches using git am -3

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. With this series, it is now possible to compile against any
version back to 0.9.11.

It is not possible to go back further than this, since the libvirt-api.xml
file we need was not installed into /usr/share prior to 0.9.11. As such I
removed Doug's patches which dealt with 0.9.6->0.9.10 Fortunately it seems
0.9.11 is in fact sufficient for OpenStack's targetted distros.

The full GIT tree is

   git clone git://fedorapeople.org/~berrange/libvirt-python-v9.git

Please take a moment to examine this. Unless bugs are found, this
GIT repo will be moved as-is onto libvirt.org GIT.

For doing releases, the following process would be needed

   ...build and install the new libvirt release RPM first...
   $ cd libvirt-python.git
   $ git tag -s -m 'Release 1.2.0' v1.2.0
   $ ./autobuild.sh
   $ git push master v1.2.0

Now the 'dist/libvirt-python-X.y.z.tar.gz' file should be copied
to http://libvirt.org/sources/python/ and also uploaded to PyPI

Distutils can do the upload, but is deprecated since it passes
your passwd in cleartext over the net :-( Instead OpenStack
guys recommend use of twine

   https://pypi.python.org/pypi/twine

eg

   $ twine upload dist/libvirt-python-x.y.z.tar.gz

Unfortunately 'twine' isn't in Fedora repos, but is easy to
install it locally using 'pip install twine'

Daniel

Daniel P. Berrange (20):
  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
  VIR_DOMAIN_EVENT_ID_BALLOON_CHANGED appeared in 0.10.0
  virDomainQemuAgentCommand appeared in 0.10.0
  VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK appeared in 1.0.0
  VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED appeared in 1.1.1
  Relax min required libvirt to version 0.9.11
  Ensure API overrides only used if API exists

Doug Goldstein (20):
  Import LIBVIR_CHECK_VERSION macro from libvirt
  Import some virTypedParams* APIs from libvirt
  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
  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
  virNodeGetCPUMap API appeared in 1.0.0
  virDomainGetJobStats API appeared in 1.0.3
  virDomainMigrateGetCompressionCache API appeared in 1.0.3
  virTypedParams* API appeared in 1.0.2 and used in 1.1.0
  virDomainMigrate3 and virDomainMigrateToURI3 appeared in 1.1.0
  virDomainCreateXMLWithFiles and virDomainCreateWithFiles APIs appeared
    in 1.1.1
  virConnectGetCPUModelNames API appeared in 1.1.3

 .gitignore              |   4 +
 AUTHORS.in              |  12 ++
 COPYING                 | 339 ++++++++++++++++++++++++++++++++
 COPYING.LESSER          | 502 ++++++++++++++++++++++++++++++++++++++++++++++++
 MANIFEST.in             |  35 ++++
 Makefile.am             | 173 -----------------
 NEWS                    |   9 +
 autobuild.sh            |  24 +++
 examples/Makefile.am    |  21 --
 generator.py            |  94 +++++----
 libvirt-lxc-override.c  |   9 +-
 libvirt-override.c      | 222 ++++++++++++++-------
 libvirt-python.spec.in  |  34 ++++
 libvirt-qemu-override.c |  13 +-
 libvirt-utils.c         | 186 ++++++++++++++++++
 libvirt-utils.h         | 209 ++++++++++++++++++++
 sanitytest.py           |   4 +
 setup.py                | 296 ++++++++++++++++++++++++++++
 typewrappers.c          |   5 +-
 19 files changed, 1866 insertions(+), 325 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
 delete mode 100644 examples/Makefile.am
 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.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux