1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-11-13 20:23:48 +03:00
Commit Graph

1291 Commits

Author SHA1 Message Date
Michal Privoznik
0974ca9326 ci: refresh with 'lcitool manifest'
This drops Fedora 40 and introduces Fedora 42 and drops
deprecated setting of env vars in dockerfiles.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
v11.9.0
2025-10-06 15:53:59 +02:00
Marc Hartmayer
44354d3b2a examples/consolecallback.py: Use hex-encoding for ^]
Use hex encoding for ^] to prevent potential rendering issues in web browsers
when viewing the file on GitLab.

While at it, make the file an executable as a Shebang line is present.

Suggested-by: Dawson Rosell <dawson.rosell@ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
2025-10-02 13:48:54 +02:00
Jiri Denemark
91b2f244c6 Post-release version bump to 11.9.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-10-01 12:51:53 +02:00
Jiri Denemark
a2047351b2 spec: Set dist_name when creating a distribution tarball
When a distribution tarball is created (python3 -m build -n -s) the
dist_name in the spec file included in that tarball must match the
actual tarball name. The tarball name depends on the setuptools version
used to create it rather than on the version of setuptools installed on
the system RPMs are built.

Fixes: ed8ab5075d
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.8.0
2025-09-11 14:14:57 +02:00
Jiri Denemark
bce4889c3a setup.py: Add support for multiple replacements in *.in
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-11 14:13:49 +02:00
Jiri Denemark
ed8ab5075d build: Adapt to PEP 625 distribution file naming
The version of setuptools shipped by Fedora 42 is PEP 625 compliant,
which requires distribution files to contain a normalized package name.
Thus the generated tarball is called libvirt_python-$VER.tar.gz rather
than libvirt-python-$VER.tar.gz created by older setuptools. The source
directory inside the tarball follows the same naming.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-09-10 14:34:56 +02:00
Jiri Denemark
c45d1f9a22 Post-release version bump to 11.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-09-01 13:09:53 +02:00
Jiri Denemark
fb567da608 Post-release version bump to 11.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.7.0
2025-08-01 11:08:46 +02:00
Jiri Denemark
0e411a8e83 Post-release version bump to 11.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.6.0
2025-07-01 11:26:56 +02:00
Jiri Denemark
3f80d9c33e Post-release version bump to 11.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.5.0
2025-06-02 10:01:30 +02:00
Ariel Otilibili
a66fcfaf2b examples/topology: define socketIds and siblingsIds as sets
socketIds and siblingsIds are declared as empty lists, filled by
list comprehensions, and later on re-used as sets.

They could be directly obtained from set comprehensions.

Fixes: 34aa32b ("Move python example programs into python/examples/ subdirectory")
Fixes: 3f4e32c ("examples: Invoke print("...") instead of print "..."")
Link: https://docs.python.org/3/tutorial/datastructures.html#sets
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
v11.4.0
2025-05-27 13:57:59 +02:00
Lukas Billy
cbcafe129b generator.py: Fix hardcoded build directory
This patch changes the hard-coded directory, so it is now possible to have custom name directory.
Signed-off-by: Lukas Billy lbilly@redhat.com
2025-05-21 13:53:34 +02:00
Michal Privoznik
21ee4c657e setup.cfg: Remove Licence classifier
Per latest setuptools recommendation [1], it's not recommended to
specify license in `classifiers`. Move it to `license`.

1: 346bf17e0c
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-05 11:04:02 +02:00
Jiri Denemark
eacf3bd0fa Post-release version bump to 11.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-05-02 09:31:23 +02:00
Jiri Denemark
e8e353f3ab Post-release version bump to 11.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.3.0
2025-04-01 12:04:39 +02:00
SuhailAhmedVelorum
0e10f82ded Fixed minor typo in libvirt-override.py::openAuth TODO item
Signed-off-by: Suhail Ahmed <suhailahmedvelorum@gmail.com>
v11.2.0
2025-03-26 15:14:11 +05:30
Michal Privoznik
590e09cec1 Add support for domain NIC MAC address change event
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-25 14:19:14 +01:00
Michal Privoznik
3b526999de override: domain: Implement override for virDomainSetThrottleGroup()
The bindings generator can't generate proper bindings for
virDomainSetThrottleGroup() (because of typed parameters in the
arguments) so implement it manually.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-21 16:42:48 +01:00
Michal Privoznik
8b350461f7 override: domain: Implement override for virDomainGetAutostartOnce()
The bindings generator can't generate proper bindings for
virDomainGetAutostartOnce() (because of int* in the arguments) so
implement it manually.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-21 16:42:48 +01:00
Michal Privoznik
81ec853802 Modernize typed parameter fetching in libvirt_virDomainSetBlockIoTune()
Instead of fetching supported tunables and passing only those to
the API (effectively ignoring unsupported ones), pass all
tunables or error out on unsupported ones.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-21 16:42:44 +01:00
Jiri Denemark
0c310d1013 Post-release version bump to 11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 13:53:52 +01:00
Pavel Hrdina
408815ae68 ci: refresh with 'lcitool manifest'
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
v11.1.0
2025-02-17 12:14:03 +01:00
Jiri Denemark
25e0674fb6 Post-release version bump to 11.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-01-15 09:13:18 +01:00
Jiri Denemark
ea18cfee9e Post-release version bump to 11.0.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v11.0.0
2024-12-02 13:21:43 +01:00
Daniel P. Berrangé
5a3729a027 ci: refresh with 'lcitool manifest'
Notable changes

 * openSUSE Leap updated to 15.6
 * Switch to URLs for referencing projects in manifest

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
v10.10.0
2024-11-18 10:48:05 +00:00
Jiri Denemark
2eca99a53b Post-release version bump to 10.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-11-01 10:17:59 +01:00
Ariel Otilibili
7f8e8ad0ad tox.ini: bumped Python
Removed 3.8, added 3.13 [1].

[1] https://devguide.python.org/versions/

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
v10.9.0
2024-10-22 23:05:17 +02:00
Jiri Denemark
d9a77dbf61 Post-release version bump to 10.9.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-10-01 11:06:53 +02:00
Jiri Denemark
14bdc4133e Post-release version bump to 10.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v10.8.0
2024-09-02 11:50:42 +02:00
Ariel Otilibili
0904b90289 example/domstart.py: Removed useless brackets for tuple unpacking
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
v10.7.0
2024-08-08 17:45:01 +02:00
Ariel Otilibili
d878d72ed7 tox.ini: Bumped environment list for Python
* aligned list with supported Python versions [1]
* as of today, supported versions are 3.8 to 3.12

https://devguide.python.org/versions/

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 17:45:01 +02:00
Ariel Otilibili
07fda40545 Makefile: make check now computes env variable on the fly
* env variable used to be Python3.6
* Python3.6 is end of life since December 2021 [1].

[1] https://devguide.python.org/versions/

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 17:45:01 +02:00
Jiri Denemark
4701d0abba Post-release version bump to 10.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-08-05 13:18:09 +02:00
Jiri Denemark
11b4a340dd Post-release version bump to 10.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v10.6.0
2024-07-01 11:13:26 +02:00
Konstantin Khorenko
fbc1a5e8d3 examples/nodestat: Show memory pinning information again
Resurrect the logic after it has been occasionally broken during fixing
the syntax complains from python.

Fixes: c588ba9 ("examples/nodestat: Fix None comparison")

Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
v10.5.0
2024-06-11 17:00:23 +03:00
Jiri Denemark
e897423493 Post-release version bump to 10.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-06-03 10:39:02 +02:00
Michal Privoznik
ee54658eb5 ci: Drop CentOS 8 Stream and switch F38 to 40, Ubuntu 20.04 to 22.04
There a lot happening here, but that's because otherwise lcitool
fails to regenerate files. Firstly, CentOS 8 is dropped as it's
unsupported now. Secondly, Fedora 40 is introduced and Fedora 38
is dropped. And lastly, Ubuntu 24.04 is introduced and Ubuntu
20.04 is dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
v10.4.0
2024-05-02 15:38:30 +02:00
Michal Privoznik
858fe08d73 test_aio.py: Fix skip message
There are two unit tests in test_aio.py that are skipped if
Python is too new (3.10 or newer). But the message printed when
they are skipped mentions just 3.10 which is confusing. Change it
to "3.10+".

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Michal Privoznik
39b7773d32 Switch to PyMODINIT_FUNC annotation
Instead of doing some 'extern ...' declaration magic to force
proper PyInit_libvirtmod*() symbol exposure in resulting .so we
can use what Python already offers - PyMODINIT_FUNC macro and
call it a day.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Michal Privoznik
a6b8929083 generator.py: Drop build/ prefix from #include
When -Ibuild flag is passed to compiler then build/ can be dropped
from includes. This is safe to do, because the prefix is only on
local includes (#include "") not system ones (#include <>).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Michal Privoznik
dcd4218837 generator.py: Switch from ${module}-export.c to ${module}-export.c.inc
The generator.py generates a (per module) table of functions it
generated code for and stores it in ${module}-export.c file. The
file is then #include-d in corresponding override.c in the table
of all methods implemented in the module.

Now, problem is with naming of the file because the ".c" suffix
might suggest the file needs to be compiled. Well, it doesn't.
It's way closer to being a header file, so change the suffix to
".c.inc".

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Michal Privoznik
865df8b846 generator.py: Allow source and build dirs override
Soon generator.py is going to be ran from a build directory which
is different than the source directory. Allow specifying these
directories on the cmd line.

And while at it, introduce new "c+py" output mode in which both C
and Python files are generated. While this is a fallback mode if
no output mode is selected, we need this new mode so that
aforementioned directories can be specified.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Michal Privoznik
533399d186 setup.py: s/PY_VERSION/VERSION/
When generating spec file, @PY_VERSION@ is replaced with the
current version of libvirt-python. Well, it's not as obvious as
it could be: usually it's just @VERSION@. Worse, the PY_ prefix
may mislead readers into thinking it refers to python version.

Just drop the PY_ prefix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2024-05-02 12:50:16 +00:00
Jiri Denemark
dfafe46ca8 Post-release version bump to 10.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-05-02 11:10:42 +02:00
Jelle van der Waa
205cdbbee7 examples: replace logging.warn with logging.warning
logging.warn is an alias to logging.warning since Python 3.3 and will be
removed in Python 3.13.

Signed-off-by: Jelle van der Waa <jvanderwaa@redhat.com>
v10.3.0
2024-05-01 08:09:53 +00:00
Daniel P. Berrangé
c647a8ba2a gitlab: stop using a venv when creating source/binary dist
The change to use 'python -m build' in

  commit 333c8bef2b
  Author: Erik Skultety <eskultet@redhat.com>
  Date:   Tue Jun 20 12:19:40 2023 +0200

    ci: Drop direct 'setup.py' usage

resulted in the CI jobs all downloading latest setuptools and
deps from pypi and running builds with them in a venv. IOW we
ceased testing against the setuptools/wheel packages provided
by the distro, which is the whole point of the CI.

Passing the '-n -x' flags to 'python -m build' tells it to stop
using a venv and not to check dependancies, thus letting it
use what we pre-installed in the container.

This doesn't work on CentOS Stream 8, however, so we revert to
using the old setup.py approach. This is a short term issue,
since Stream 8 is EOL at the end of May, so we'll be deleting
all the Stream 8 jobs across libvirt CI very soon.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-04-30 10:23:31 +01:00
Daniel P. Berrangé
e2a8524bc8 ci: refresh with lcitool manifest
This pulls in the new wheel packages.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-04-25 10:22:46 +01:00
Daniel P. Berrangé
379ecce9f5 ci: add 'python3-wheel' as a dep
The 'python -m build' command creates a source dist and a binary
wheel. To be able run this command without creating a new venv
and downloading from pypi, we need to pre-install the 'wheel'
package.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-04-25 10:21:27 +01:00
Daniel P. Berrangé
5b4e4f9a90 ci: refresh with latest lcitool manifest
Fixes logic that caused some jobs to mistakenly not be run
when expected.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-04-25 09:53:22 +01:00
Jiri Denemark
bfc985a89e Post-release version bump to 10.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-04-02 13:44:28 +02:00