| 1 |
Metadata-Version: 2.4 |
| 2 |
Name: libvirt-python |
| 3 |
Version: 12.6.0 |
| 4 |
Summary: The libvirt virtualization API python binding |
| 5 |
Home-page: http://www.libvirt.org |
| 6 |
Maintainer: Libvirt Maintainers |
| 7 |
Maintainer-email: [email protected] |
| 8 |
License: LGPL-v2.0-or-later |
| 9 |
Classifier: Development Status :: 5 - Production/Stable |
| 10 |
Classifier: Intended Audience :: Developers |
| 11 |
Classifier: Programming Language :: Python :: 3 :: Only |
| 12 |
Requires-Python: >=3.6 |
| 13 |
Description-Content-Type: text/x-rst |
| 14 |
License-File: COPYING |
| 15 |
Dynamic: license-file |
| 16 |
|
| 17 |
Libvirt Python Binding README |
| 18 |
============================= |
| 19 |
|
| 20 |
This package provides a module that permits applications |
| 21 |
written in the Python 3.x programming language to call the interface |
| 22 |
supplied by the libvirt library, to manage the virtualization |
| 23 |
capabilities of recent versions of Linux (and other OSes). |
| 24 |
As such, the module exposes Python bindings to to the libvirt.so, |
| 25 |
libvirt-qemu.so and libvirt-lxc.so library APIs. |
| 26 |
|
| 27 |
It is written to build against any version of libvirt that |
| 28 |
is 0.9.11 or newer. |
| 29 |
|
| 30 |
This code is distributed under the terms of the LGPL version |
| 31 |
2 or later. |
| 32 |
|
| 33 |
Requirements |
| 34 |
------------ |
| 35 |
|
| 36 |
To build the libvirt python binary requires the GCC and pkg-config |
| 37 |
tools, and development headers for the libvirt and python libraries. |
| 38 |
|
| 39 |
Additionally, the Python build module is required and can be installed via: |
| 40 |
|
| 41 |
$ dnf install python3-build |
| 42 |
|
| 43 |
or |
| 44 |
|
| 45 |
$ python3 -m pip install --user build |
| 46 |
|
| 47 |
Building and installing |
| 48 |
----------------------- |
| 49 |
|
| 50 |
The module can be built by following the normal python module |
| 51 |
build process |
| 52 |
|
| 53 |
$ python3 -m build |
| 54 |
|
| 55 |
for testing and distributing purposes or it can be installed directly via pip |
| 56 |
as |
| 57 |
|
| 58 |
$ python3 -m pip install . |
| 59 |
|
| 60 |
without explicit building. |
| 61 |
|
| 62 |
In order to test the package, you'll need either tox or at least pytest, |
| 63 |
depending on whether you want to test an already installed package in which |
| 64 |
case the latter is sufficient or if you wish to test in a virtual |
| 65 |
environment you'd need tox. |
| 66 |
|
| 67 |
To install pytest, use one of: |
| 68 |
|
| 69 |
$ dnf install python3-pytest |
| 70 |
|
| 71 |
or |
| 72 |
|
| 73 |
$ python3 -m pip install --user pytest |
| 74 |
|
| 75 |
To install tox, use one of: |
| 76 |
|
| 77 |
$ dnf install python3-tox |
| 78 |
|
| 79 |
or |
| 80 |
|
| 81 |
$ python3 -m pip install --user tox |
| 82 |
|
| 83 |
Additionally, install the remaining test dependencies: |
| 84 |
|
| 85 |
$ python3 -m pip install -r requirements-test.txt |
| 86 |
|
| 87 |
Depending on your preferred setup, you can run the tests either as |
| 88 |
|
| 89 |
$ python3 -m pytest |
| 90 |
|
| 91 |
or as |
| 92 |
|
| 93 |
$ tox |
| 94 |
|
| 95 |
Free-threaded Python (py313t, py314t) test environments require tox>=4.26 |
| 96 |
and the corresponding free-threaded interpreters (python3.13t, python3.14t) |
| 97 |
to be installed. |
| 98 |
|
| 99 |
A makefile shim is also provided for your convenience, so that you don't have |
| 100 |
to care about the exact operations mentioned above and instead you simply do |
| 101 |
|
| 102 |
$ make && make check |
| 103 |
|
| 104 |
As of libvirt 1.2.6, it is possible to develop against an uninstalled |
| 105 |
libvirt.git checkout, by setting PKG_CONFIG_PATH and LD_LIBRARY_PATH |
| 106 |
environment variables to point into that libvirt tree; you can even |
| 107 |
automate this by using libvirt's run script: |
| 108 |
|
| 109 |
/path/to/libvirt/run python3 -m build |
| 110 |
|
| 111 |
Patches for this code should be submitted as merge requests to the |
| 112 |
project page on gitlab. See CONTRIBUTING.rst for more information. |