mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-11-12 16:23:47 +03:00
Request the Python stable API when building
We have Python 3.6 as a minimum version. If we set Py_LIMITED_API to 0x03060000, we'll get the stable python API associated with versions >= 3.6. This lets users compile once and have the libvirt binary module be loadable by any Python version >= 3.6, as described in: https://docs.python.org/3/c-api/stable.html Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
committed by
Jiri Denemark
parent
f76708b8fa
commit
1d0166204c
2
setup.py
2
setup.py
@@ -87,6 +87,8 @@ def get_module_lists():
|
||||
ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
|
||||
cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()
|
||||
|
||||
cflags += ["-Wp,-DPy_LIMITED_API=0x03060000"]
|
||||
|
||||
module = Extension("libvirtmod",
|
||||
sources=[
|
||||
"libvirt-override.c",
|
||||
|
||||
Reference in New Issue
Block a user