libvirt-python 10.2.0__tar.gz → 10.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/AUTHORS +1 -0
  2. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/ChangeLog +151 -0
  3. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/PKG-INFO +1 -1
  4. libvirt-python-10.4.0/VERSION +1 -0
  5. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/build/libvirt_python.egg-info/SOURCES.txt +0 -33
  6. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/consolecallback.py +1 -1
  7. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/generator.py +25 -15
  8. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-lxc-override.c +3 -9
  9. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override.c +3 -9
  10. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-python.spec +1 -1
  11. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-qemu-override.c +3 -9
  12. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/setup.py +2 -1
  13. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_aio.py +2 -2
  14. libvirt-python-10.2.0/.ctags +0 -2
  15. libvirt-python-10.2.0/.dir-locals.el +0 -8
  16. libvirt-python-10.2.0/.github/workflows/lockdown.yml +0 -52
  17. libvirt-python-10.2.0/.gitignore +0 -15
  18. libvirt-python-10.2.0/.gitlab-ci.yml +0 -75
  19. libvirt-python-10.2.0/.mailmap +0 -16
  20. libvirt-python-10.2.0/AUTHORS.in +0 -12
  21. libvirt-python-10.2.0/VERSION +0 -1
  22. libvirt-python-10.2.0/ci/buildenv/centos-stream-8.sh +0 -40
  23. libvirt-python-10.2.0/ci/buildenv/centos-stream-9.sh +0 -55
  24. libvirt-python-10.2.0/ci/buildenv/debian-sid.sh +0 -38
  25. libvirt-python-10.2.0/ci/buildenv/fedora-38.sh +0 -34
  26. libvirt-python-10.2.0/ci/buildenv/fedora-rawhide.sh +0 -35
  27. libvirt-python-10.2.0/ci/buildenv/opensuse-leap-15.sh +0 -35
  28. libvirt-python-10.2.0/ci/buildenv/opensuse-tumbleweed.sh +0 -34
  29. libvirt-python-10.2.0/ci/buildenv/ubuntu-2004.sh +0 -39
  30. libvirt-python-10.2.0/ci/buildenv/ubuntu-2204.sh +0 -39
  31. libvirt-python-10.2.0/ci/containers/centos-stream-8.Dockerfile +0 -43
  32. libvirt-python-10.2.0/ci/containers/centos-stream-9.Dockerfile +0 -57
  33. libvirt-python-10.2.0/ci/containers/debian-sid.Dockerfile +0 -41
  34. libvirt-python-10.2.0/ci/containers/fedora-38.Dockerfile +0 -46
  35. libvirt-python-10.2.0/ci/containers/fedora-rawhide.Dockerfile +0 -47
  36. libvirt-python-10.2.0/ci/containers/opensuse-leap-15.Dockerfile +0 -37
  37. libvirt-python-10.2.0/ci/containers/opensuse-tumbleweed.Dockerfile +0 -35
  38. libvirt-python-10.2.0/ci/containers/ubuntu-2004.Dockerfile +0 -43
  39. libvirt-python-10.2.0/ci/containers/ubuntu-2204.Dockerfile +0 -43
  40. libvirt-python-10.2.0/ci/gitlab/build-templates.yml +0 -142
  41. libvirt-python-10.2.0/ci/gitlab/builds.yml +0 -162
  42. libvirt-python-10.2.0/ci/gitlab/container-templates.yml +0 -45
  43. libvirt-python-10.2.0/ci/gitlab/containers.yml +0 -84
  44. libvirt-python-10.2.0/ci/gitlab/sanity-checks.yml +0 -29
  45. libvirt-python-10.2.0/ci/gitlab.yml +0 -90
  46. libvirt-python-10.2.0/ci/manifest.yml +0 -85
  47. libvirt-python-10.2.0/libvirt-python.spec.in +0 -88
  48. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/CONTRIBUTING.rst +0 -0
  49. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/COPYING +0 -0
  50. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/HACKING +0 -0
  51. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/MANIFEST.in +0 -0
  52. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/Makefile +0 -0
  53. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/README +0 -0
  54. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/README +0 -0
  55. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/dhcpleases.py +0 -0
  56. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/dominfo.py +0 -0
  57. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/domipaddrs.py +0 -0
  58. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/domrestore.py +0 -0
  59. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/domsave.py +0 -0
  60. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/domstart.py +0 -0
  61. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/esxlist.py +0 -0
  62. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/event-test.py +0 -0
  63. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/guest-vcpus/guest-vcpu-daemon.py +0 -0
  64. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/guest-vcpus/guest-vcpu.py +0 -0
  65. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/nodestats.py +0 -0
  66. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/sparsestream.py +0 -0
  67. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/examples/topology.py +0 -0
  68. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-lxc-override-api.xml +0 -0
  69. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-api.xml +0 -0
  70. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virConnect.py +0 -0
  71. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virDomain.py +0 -0
  72. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virDomainCheckpoint.py +0 -0
  73. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virDomainSnapshot.py +0 -0
  74. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virNetwork.py +0 -0
  75. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virStoragePool.py +0 -0
  76. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override-virStream.py +0 -0
  77. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-override.py +0 -0
  78. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-qemu-override-api.xml +0 -0
  79. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-qemu-override.py +0 -0
  80. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-utils.c +0 -0
  81. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirt-utils.h +0 -0
  82. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/libvirtaio.py +0 -0
  83. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/pyproject.toml +0 -0
  84. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/requirements-test.txt +0 -0
  85. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/setup.cfg +0 -0
  86. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/eventmock.py +0 -0
  87. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_api_coverage.py +0 -0
  88. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_conn.py +0 -0
  89. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_domain.py +0 -0
  90. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_domain_checkpoint.py +0 -0
  91. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_domain_snapshot.py +0 -0
  92. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_interface.py +0 -0
  93. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_network.py +0 -0
  94. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_nodedev.py +0 -0
  95. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tests/test_storage.py +0 -0
  96. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/tox.ini +0 -0
  97. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/typewrappers.c +0 -0
  98. {libvirt-python-10.2.0 → libvirt-python-10.4.0}/typewrappers.h +0 -0
@@ -42,6 +42,7 @@ The individual contributors are
42
42
  Han Han <hhan@redhat.com>
43
43
  Hu Tao <hutao@cn.fujitsu.com>
44
44
  Jason Andryuk <andryuk@aero.org>
45
+ Jelle van der Waa <jvanderwaa@redhat.com>
45
46
  Jim Fehlig <jfehlig@suse.com>
46
47
  Jim Meyering <meyering@redhat.com>
47
48
  Jiri Denemark <jdenemar@redhat.com>
@@ -1,3 +1,154 @@
1
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
2
+
3
+ ci: Drop CentOS 8 Stream and switch F38 to 40, Ubuntu 20.04 to 22.04
4
+ There a lot happening here, but that's because otherwise lcitool
5
+ fails to regenerate files. Firstly, CentOS 8 is dropped as it's
6
+ unsupported now. Secondly, Fedora 40 is introduced and Fedora 38
7
+ is dropped. And lastly, Ubuntu 24.04 is introduced and Ubuntu
8
+ 20.04 is dropped.
9
+
10
+
11
+
12
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
13
+
14
+ test_aio.py: Fix skip message
15
+ There are two unit tests in test_aio.py that are skipped if
16
+ Python is too new (3.10 or newer). But the message printed when
17
+ they are skipped mentions just 3.10 which is confusing. Change it
18
+ to "3.10+".
19
+
20
+
21
+
22
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
23
+
24
+ Switch to PyMODINIT_FUNC annotation
25
+ Instead of doing some 'extern ...' declaration magic to force
26
+ proper PyInit_libvirtmod*() symbol exposure in resulting .so we
27
+ can use what Python already offers - PyMODINIT_FUNC macro and
28
+ call it a day.
29
+
30
+
31
+
32
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
33
+
34
+ generator.py: Drop build/ prefix from #include
35
+ When -Ibuild flag is passed to compiler then build/ can be dropped
36
+ from includes. This is safe to do, because the prefix is only on
37
+ local includes (#include "") not system ones (#include <>).
38
+
39
+
40
+
41
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
42
+
43
+ generator.py: Switch from ${module}-export.c to ${module}-export.c.inc
44
+ The generator.py generates a (per module) table of functions it
45
+ generated code for and stores it in ${module}-export.c file. The
46
+ file is then #include-d in corresponding override.c in the table
47
+ of all methods implemented in the module.
48
+
49
+ Now, problem is with naming of the file because the ".c" suffix
50
+ might suggest the file needs to be compiled. Well, it doesn't.
51
+ It's way closer to being a header file, so change the suffix to
52
+ ".c.inc".
53
+
54
+
55
+
56
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
57
+
58
+ generator.py: Allow source and build dirs override
59
+ Soon generator.py is going to be ran from a build directory which
60
+ is different than the source directory. Allow specifying these
61
+ directories on the cmd line.
62
+
63
+ And while at it, introduce new "c+py" output mode in which both C
64
+ and Python files are generated. While this is a fallback mode if
65
+ no output mode is selected, we need this new mode so that
66
+ aforementioned directories can be specified.
67
+
68
+
69
+
70
+ 2024- 5- 2 Michal Privoznik <mprivozn@redhat.com>
71
+
72
+ setup.py: s/PY_VERSION/VERSION/
73
+ When generating spec file, @PY_VERSION@ is replaced with the
74
+ current version of libvirt-python. Well, it's not as obvious as
75
+ it could be: usually it's just @VERSION@. Worse, the PY_ prefix
76
+ may mislead readers into thinking it refers to python version.
77
+
78
+ Just drop the PY_ prefix.
79
+
80
+
81
+
82
+ 2024- 5- 2 Jiri Denemark <jdenemar@redhat.com>
83
+
84
+ Post-release version bump to 10.4.0
85
+
86
+
87
+ 2024- 5- 1 Jelle van der Waa <jvanderwaa@redhat.com>
88
+
89
+ examples: replace logging.warn with logging.warning
90
+ logging.warn is an alias to logging.warning since Python 3.3 and will be
91
+ removed in Python 3.13.
92
+
93
+
94
+
95
+ 2024- 4- 30 Daniel P. Berrangé <berrange@redhat.com>
96
+
97
+ gitlab: stop using a venv when creating source/binary dist
98
+ The change to use 'python -m build' in
99
+
100
+ commit 333c8bef2bcca5ca7dbcdb5861a385d626e0feb9
101
+ Author: Erik Skultety <eskultet@redhat.com>
102
+ Date: Tue Jun 20 12:19:40 2023 +0200
103
+
104
+ ci: Drop direct 'setup.py' usage
105
+
106
+ resulted in the CI jobs all downloading latest setuptools and
107
+ deps from pypi and running builds with them in a venv. IOW we
108
+ ceased testing against the setuptools/wheel packages provided
109
+ by the distro, which is the whole point of the CI.
110
+
111
+ Passing the '-n -x' flags to 'python -m build' tells it to stop
112
+ using a venv and not to check dependancies, thus letting it
113
+ use what we pre-installed in the container.
114
+
115
+ This doesn't work on CentOS Stream 8, however, so we revert to
116
+ using the old setup.py approach. This is a short term issue,
117
+ since Stream 8 is EOL at the end of May, so we'll be deleting
118
+ all the Stream 8 jobs across libvirt CI very soon.
119
+
120
+
121
+
122
+ 2024- 4- 25 Daniel P. Berrangé <berrange@redhat.com>
123
+
124
+ ci: refresh with lcitool manifest
125
+ This pulls in the new wheel packages.
126
+
127
+
128
+
129
+ 2024- 4- 25 Daniel P. Berrangé <berrange@redhat.com>
130
+
131
+ ci: add 'python3-wheel' as a dep
132
+ The 'python -m build' command creates a source dist and a binary
133
+ wheel. To be able run this command without creating a new venv
134
+ and downloading from pypi, we need to pre-install the 'wheel'
135
+ package.
136
+
137
+
138
+
139
+ 2024- 4- 25 Daniel P. Berrangé <berrange@redhat.com>
140
+
141
+ ci: refresh with latest lcitool manifest
142
+ Fixes logic that caused some jobs to mistakenly not be run
143
+ when expected.
144
+
145
+
146
+
147
+ 2024- 4- 2 Jiri Denemark <jdenemar@redhat.com>
148
+
149
+ Post-release version bump to 10.3.0
150
+
151
+
1
152
  2024- 3- 1 Jiri Denemark <jdenemar@redhat.com>
2
153
 
3
154
  Post-release version bump to 10.2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libvirt-python
3
- Version: 10.2.0
3
+ Version: 10.4.0
4
4
  Summary: The libvirt virtualization API python binding
5
5
  Home-page: http://www.libvirt.org
6
6
  Maintainer: Libvirt Maintainers
@@ -0,0 +1 @@
1
+ 10.4.0
@@ -1,10 +1,4 @@
1
- .ctags
2
- .dir-locals.el
3
- .gitignore
4
- .gitlab-ci.yml
5
- .mailmap
6
1
  AUTHORS
7
- AUTHORS.in
8
2
  CONTRIBUTING.rst
9
3
  COPYING
10
4
  ChangeLog
@@ -27,7 +21,6 @@ libvirt-override-virStream.py
27
21
  libvirt-override.c
28
22
  libvirt-override.py
29
23
  libvirt-python.spec
30
- libvirt-python.spec.in
31
24
  libvirt-qemu-override-api.xml
32
25
  libvirt-qemu-override.c
33
26
  libvirt-qemu-override.py
@@ -41,32 +34,6 @@ setup.py
41
34
  tox.ini
42
35
  typewrappers.c
43
36
  typewrappers.h
44
- .github/workflows/lockdown.yml
45
- ci/gitlab.yml
46
- ci/manifest.yml
47
- ci/buildenv/centos-stream-8.sh
48
- ci/buildenv/centos-stream-9.sh
49
- ci/buildenv/debian-sid.sh
50
- ci/buildenv/fedora-38.sh
51
- ci/buildenv/fedora-rawhide.sh
52
- ci/buildenv/opensuse-leap-15.sh
53
- ci/buildenv/opensuse-tumbleweed.sh
54
- ci/buildenv/ubuntu-2004.sh
55
- ci/buildenv/ubuntu-2204.sh
56
- ci/containers/centos-stream-8.Dockerfile
57
- ci/containers/centos-stream-9.Dockerfile
58
- ci/containers/debian-sid.Dockerfile
59
- ci/containers/fedora-38.Dockerfile
60
- ci/containers/fedora-rawhide.Dockerfile
61
- ci/containers/opensuse-leap-15.Dockerfile
62
- ci/containers/opensuse-tumbleweed.Dockerfile
63
- ci/containers/ubuntu-2004.Dockerfile
64
- ci/containers/ubuntu-2204.Dockerfile
65
- ci/gitlab/build-templates.yml
66
- ci/gitlab/builds.yml
67
- ci/gitlab/container-templates.yml
68
- ci/gitlab/containers.yml
69
- ci/gitlab/sanity-checks.yml
70
37
  examples/README
71
38
  examples/consolecallback.py
72
39
  examples/dhcpleases.py
@@ -19,7 +19,7 @@ def error_handler(unused, error) -> None:
19
19
  # The console stream errors on VM shutdown; we don't care
20
20
  if error[0] == libvirt.VIR_ERR_RPC and error[1] == libvirt.VIR_FROM_STREAMS:
21
21
  return
22
- logging.warn(error)
22
+ logging.warning(error)
23
23
 
24
24
 
25
25
  class Console(object):
@@ -31,6 +31,8 @@ quiet = True
31
31
  #######################################################################
32
32
  debug = 0
33
33
  onlyOverrides = False
34
+ sourceDir = "."
35
+ buildDir = "build"
34
36
 
35
37
  libvirt_headers = [
36
38
  "libvirt",
@@ -49,6 +51,11 @@ libvirt_headers = [
49
51
  "libvirt-stream",
50
52
  ]
51
53
 
54
+ def openSourceFile(file: str, mode: str = "r", optional: bool = False):
55
+ path = os.path.join(sourceDir, file)
56
+ if optional and not os.path.exists(path):
57
+ return None
58
+ return open(path, mode)
52
59
 
53
60
  def parse(data: IO[str]) -> None:
54
61
  target = docParser()
@@ -297,7 +304,7 @@ py_types = {
297
304
  #######################################################################
298
305
  #
299
306
  # This part writes the C <-> Python stubs libvirt.[ch] and
300
- # the table libvirt-export.c to add when registering the Python module
307
+ # the table libvirt-export.c.inc to add when registering the Python module
301
308
  #
302
309
  #######################################################################
303
310
 
@@ -853,7 +860,7 @@ def load_apis(module: str, api_xml: str):
853
860
 
854
861
  try:
855
862
  onlyOverrides = True
856
- with open(override_api_xml) as stream:
863
+ with openSourceFile(override_api_xml) as stream:
857
864
  parse(stream)
858
865
  except IOError as msg:
859
866
  print(override_api_xml, ":", msg)
@@ -869,9 +876,9 @@ def emit_c_code(module: str) -> None:
869
876
 
870
877
  nb_wrap = 0
871
878
 
872
- header_file = "build/%s.h" % module
873
- export_file = "build/%s-export.c" % module
874
- wrapper_file = "build/%s.c" % module
879
+ header_file = "%s/%s.h" % (buildDir, module)
880
+ export_file = "%s/%s-export.c.inc" % (buildDir, module)
881
+ wrapper_file = "%s/%s.c" % (buildDir, module)
875
882
 
876
883
  include = open(header_file, "w")
877
884
  include.write("/* Generated by generator.py */\n\n")
@@ -885,7 +892,7 @@ def emit_c_code(module: str) -> None:
885
892
  wrapper.write("#include <Python.h>\n")
886
893
  wrapper.write("#include <libvirt/%s.h>\n" % (module,))
887
894
  wrapper.write("#include \"typewrappers.h\"\n")
888
- wrapper.write("#include \"build/%s.h\"\n\n" % (module,))
895
+ wrapper.write("#include \"%s.h\"\n\n" % (module))
889
896
 
890
897
  for function in sorted(functions):
891
898
  if print_function_wrapper(package, function, wrapper, export, include):
@@ -1313,14 +1320,12 @@ def emit_py_code(module: str) -> None:
1313
1320
  info = (0, func, name, ret, args, file, mod)
1314
1321
  function_classes['None'].append(info)
1315
1322
 
1316
- classes_file = "build/%s.py" % package
1323
+ classes_file = "%s/%s.py" % (buildDir, package)
1317
1324
  extra_file = "%s-override.py" % module
1318
- extra = None
1325
+ extra = openSourceFile(extra_file, "r", True)
1319
1326
 
1320
1327
  classes = open(classes_file, "w")
1321
1328
 
1322
- if os.path.exists(extra_file):
1323
- extra = open(extra_file, "r")
1324
1329
  classes.write("#\n")
1325
1330
  classes.write("# WARNING WARNING WARNING WARNING\n")
1326
1331
  classes.write("#\n")
@@ -1629,8 +1634,8 @@ def emit_py_code(module: str) -> None:
1629
1634
  classes.write("\n")
1630
1635
  # Append "<classname>.py" to class def, iff it exists
1631
1636
  class_override = "%s-override-%s.py" % (module, classname)
1632
- if os.path.exists(class_override):
1633
- extra = open(class_override, "r")
1637
+ extra = openSourceFile(class_override, "r", True)
1638
+ if extra:
1634
1639
  classes.write(" #\n")
1635
1640
  classes.write(" # %s methods from %s.py (hand coded)\n" % (classname, classname))
1636
1641
  classes.write(" #\n")
@@ -1776,6 +1781,11 @@ if sys.argv[1] not in ["libvirt", "libvirt-lxc", "libvirt-qemu"]:
1776
1781
  print("ERROR: unknown module %s" % sys.argv[1])
1777
1782
  sys.exit(1)
1778
1783
 
1784
+ if len(sys.argv) == 6:
1785
+ buildDir = sys.argv[5]
1786
+ if len(sys.argv) >= 5:
1787
+ sourceDir = sys.argv[4]
1788
+
1779
1789
  load_apis(sys.argv[1], sys.argv[2])
1780
1790
 
1781
1791
  if validate_functions() < 0:
@@ -1786,12 +1796,12 @@ if not os.path.exists("build"):
1786
1796
  os.mkdir("build")
1787
1797
 
1788
1798
  output = None
1789
- if len(sys.argv) == 4:
1799
+ if len(sys.argv) >= 4:
1790
1800
  output = sys.argv[3]
1791
- if output == "c" or output is None:
1801
+ if output == "c" or output == "c+py" or output is None:
1792
1802
  emit_c_code(sys.argv[1])
1793
1803
 
1794
- if output == "py" or output is None:
1804
+ if output == "py" or output == "c+py" or output is None:
1795
1805
  emit_py_code(sys.argv[1])
1796
1806
 
1797
1807
  sys.exit(0)
@@ -19,13 +19,7 @@
19
19
  #include <libvirt/virterror.h>
20
20
  #include "typewrappers.h"
21
21
  #include "libvirt-utils.h"
22
- #include "build/libvirt-lxc.h"
23
-
24
- #ifndef __CYGWIN__
25
- extern PyObject *PyInit_libvirtmod_lxc(void);
26
- #else
27
- extern PyObject *PyInit_cygvirtmod_lxc(void);
28
- #endif
22
+ #include "libvirt-lxc.h"
29
23
 
30
24
  #if 0
31
25
  # define DEBUG_ERROR 1
@@ -94,7 +88,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
94
88
  * *
95
89
  ************************************************************************/
96
90
  static PyMethodDef libvirtLxcMethods[] = {
97
- #include "build/libvirt-lxc-export.c"
91
+ #include "libvirt-lxc-export.c.inc"
98
92
  {(char *) "virDomainLxcOpenNamespace", libvirt_lxc_virDomainLxcOpenNamespace, METH_VARARGS, NULL},
99
93
  {NULL, NULL, 0, NULL}
100
94
  };
@@ -115,7 +109,7 @@ static struct PyModuleDef moduledef = {
115
109
  NULL
116
110
  };
117
111
 
118
- PyObject *
112
+ PyMODINIT_FUNC
119
113
  #ifndef __CYGWIN__
120
114
  PyInit_libvirtmod_lxc
121
115
  #else
@@ -26,15 +26,9 @@
26
26
  #include <libvirt/virterror.h>
27
27
  #include <stddef.h>
28
28
  #include "typewrappers.h"
29
- #include "build/libvirt.h"
29
+ #include "libvirt.h"
30
30
  #include "libvirt-utils.h"
31
31
 
32
- #ifndef __CYGWIN__
33
- extern PyObject *PyInit_libvirtmod(void);
34
- #else
35
- extern PyObject *PyInit_cygvirtmod(void);
36
- #endif
37
-
38
32
  #if 0
39
33
  # define DEBUG_ERROR 1
40
34
  #endif
@@ -10930,7 +10924,7 @@ libvirt_virDomainFDAssociate(PyObject *self ATTRIBUTE_UNUSED,
10930
10924
  * *
10931
10925
  ************************************************************************/
10932
10926
  static PyMethodDef libvirtMethods[] = {
10933
- #include "build/libvirt-export.c"
10927
+ #include "libvirt-export.c.inc"
10934
10928
  {(char *) "virGetVersion", libvirt_virGetVersion, METH_VARARGS, NULL},
10935
10929
  {(char *) "virConnectGetVersion", libvirt_virConnectGetVersion, METH_VARARGS, NULL},
10936
10930
  #if LIBVIR_CHECK_VERSION(1, 1, 3)
@@ -11227,7 +11221,7 @@ static struct PyModuleDef moduledef = {
11227
11221
  NULL
11228
11222
  };
11229
11223
 
11230
- PyObject *
11224
+ PyMODINIT_FUNC
11231
11225
  #ifndef __CYGWIN__
11232
11226
  PyInit_libvirtmod
11233
11227
  #else
@@ -14,7 +14,7 @@
14
14
 
15
15
  Summary: The libvirt virtualization API python3 binding
16
16
  Name: libvirt-python
17
- Version: 10.2.0
17
+ Version: 10.4.0
18
18
  Release: 1%{?dist}
19
19
  Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz
20
20
  Url: https://libvirt.org
@@ -20,17 +20,11 @@
20
20
  #include <libvirt/virterror.h>
21
21
  #include "typewrappers.h"
22
22
  #include "libvirt-utils.h"
23
- #include "build/libvirt-qemu.h"
23
+ #include "libvirt-qemu.h"
24
24
  #ifndef __CYGWIN__
25
25
  # include <fcntl.h>
26
26
  #endif
27
27
 
28
- #ifndef __CYGWIN__
29
- extern PyObject *PyInit_libvirtmod_qemu(void);
30
- #else
31
- extern PyObject *PyInit_cygvirtmod_qemu(void);
32
- #endif
33
-
34
28
  #if 0
35
29
  # define DEBUG_ERROR 1
36
30
  #endif
@@ -447,7 +441,7 @@ libvirt_qemu_virDomainQemuMonitorCommandWithFiles(PyObject *self ATTRIBUTE_UNUSE
447
441
  * *
448
442
  ************************************************************************/
449
443
  static PyMethodDef libvirtQemuMethods[] = {
450
- #include "build/libvirt-qemu-export.c"
444
+ #include "libvirt-qemu-export.c.inc"
451
445
  {(char *) "virDomainQemuMonitorCommand", libvirt_qemu_virDomainQemuMonitorCommand, METH_VARARGS, NULL},
452
446
  #if LIBVIR_CHECK_VERSION(0, 10, 0)
453
447
  {(char *) "virDomainQemuAgentCommand", libvirt_qemu_virDomainQemuAgentCommand, METH_VARARGS, NULL},
@@ -478,7 +472,7 @@ static struct PyModuleDef moduledef = {
478
472
  NULL
479
473
  };
480
474
 
481
- PyObject *
475
+ PyMODINIT_FUNC
482
476
  #ifndef __CYGWIN__
483
477
  PyInit_libvirtmod_qemu
484
478
  #else
@@ -87,6 +87,7 @@ def get_module_lists():
87
87
  ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
88
88
  cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()
89
89
 
90
+ cflags += ["-Ibuild"]
90
91
  cflags += ["-Wp,-DPy_LIMITED_API=0x03060000"]
91
92
 
92
93
  module = Extension("libvirtmod",
@@ -196,7 +197,7 @@ class my_sdist(sdist):
196
197
  def gen_rpm_spec(self):
197
198
  return self._gen_from_in("libvirt-python.spec.in",
198
199
  "libvirt-python.spec",
199
- "@PY_VERSION@",
200
+ "@VERSION@",
200
201
  getVersion())
201
202
 
202
203
  def gen_authors(self):
@@ -118,7 +118,7 @@ class TestLibvirtAio(unittest.TestCase):
118
118
 
119
119
  @mock.patch('libvirt.virEventRegisterImpl',
120
120
  side_effect=eventmock.virEventRegisterImplMock)
121
- @unittest.skipIf(sys.version_info >= (3,10), "test incompatible with 3.10")
121
+ @unittest.skipIf(sys.version_info >= (3,10), "test incompatible with 3.10+")
122
122
  def testEventsPreInitImplicit(self, mock_event_register):
123
123
  # Register libvirt events before starting the asyncio loop.
124
124
  #
@@ -136,7 +136,7 @@ class TestLibvirtAio(unittest.TestCase):
136
136
 
137
137
  @mock.patch('libvirt.virEventRegisterImpl',
138
138
  side_effect=eventmock.virEventRegisterImplMock)
139
- @unittest.skipIf(sys.version_info >= (3,10), "test incompatible with 3.10")
139
+ @unittest.skipIf(sys.version_info >= (3,10), "test incompatible with 3.10+")
140
140
  def testEventsImplicitLoopInit(self, mock_event_register):
141
141
  # Register libvirt events before starting the asyncio loop.
142
142
  #
@@ -1,2 +0,0 @@
1
- --recurse
2
- --exclude=*.orig
@@ -1,8 +0,0 @@
1
- (
2
- (c-mode . (
3
- (c-file-style . "K&R")
4
- (indent-tabs-mode . nil)
5
- (c-indent-level . 4)
6
- (c-basic-offset . 4)
7
- ))
8
- )
@@ -1,52 +0,0 @@
1
- ---
2
- # Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown
3
-
4
- name: 'Repo Lockdown'
5
-
6
- on:
7
- issues:
8
- types: opened
9
- pull_request_target:
10
- types: opened
11
-
12
- permissions:
13
- pull-requests: write
14
- issues: write
15
-
16
- jobs:
17
- action:
18
- runs-on: ubuntu-latest
19
- steps:
20
- - uses: dessant/repo-lockdown@v2
21
- with:
22
- issue-comment: |
23
- Thank you for your interest in the libvirt project.
24
-
25
- Since this repository is a read-only mirror of the project's master
26
- repostory hosted on GitLab, issues opened here are not processed.
27
-
28
- We kindly request that new issues are reported to
29
-
30
- https://gitlab.com/libvirt/libvirt-python/-/issues/new
31
-
32
- Thank you for your time and understanding.
33
- lock-issue: true
34
- close-issue: true
35
- pr-comment: |
36
- Thank you for your interest in the libvirt project.
37
-
38
- Since this repository is a read-only mirror of the project's master
39
- repostory hosted on GitLab, merge requests opened here are not
40
- processed.
41
-
42
- We kindly request that contributors fork the project at
43
-
44
- https://gitlab.com/libvirt/libvirt-python/
45
-
46
- push changes to the fork, and then open a new merge request at
47
-
48
- https://gitlab.com/libvirt/libvirt-python/-/merge_requests/new
49
-
50
- Thank you for your time and understanding.
51
- lock-pr: true
52
- close-pr: true
@@ -1,15 +0,0 @@
1
- build/
2
- dist/
3
- MANIFEST
4
- *~
5
- *#*#
6
- *.#*#
7
- *.py[cod]
8
- tags
9
- .tox
10
- dist/
11
- eggs/
12
- .eggs/
13
- sdist/
14
- *.egg-info/
15
- *.egg
@@ -1,75 +0,0 @@
1
-
2
- stages:
3
- - containers
4
- - builds
5
- - sanity_checks
6
-
7
- .git_build_vars: &git_build_vars |
8
- export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
9
- export SCRATCH_DIR="$PWD/scratch"
10
- export VROOT="$SCRATCH_DIR/vroot"
11
- export LIBDIR="$VROOT/lib"
12
- export LD_LIBRARY_PATH="$LIBDIR"
13
- export PATH="$VROOT/bin:$PATH"
14
- export PKG_CONFIG_PATH="$LIBDIR/pkgconfig"
15
- export CFLAGS="-Werror"
16
-
17
- .native_git_build_job:
18
- extends:
19
- - .gitlab_native_build_job
20
- script:
21
- - *git_build_vars
22
- - pushd "$PWD"
23
- - mkdir -p "$SCRATCH_DIR"
24
- - cd "$SCRATCH_DIR"
25
- - git clone --depth 1 https://gitlab.com/libvirt/libvirt.git
26
- - cd libvirt
27
- - meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR"
28
- - ninja -C build install
29
- - popd
30
- - $PYTHON -m build
31
- - $PYTHON -m venv test-venv --system-site-packages --symlinks
32
- - test-venv/bin/python -m pip install dist/libvirt_python*.whl
33
- - test-venv/bin/python -m pytest tests
34
- - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
35
- then
36
- unset CFLAGS ;
37
- rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
38
- mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
39
- fi
40
-
41
- .native_build_job:
42
- extends:
43
- - .gitlab_native_build_job
44
- script:
45
- - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
46
- - export CFLAGS="-Werror"
47
- - $PYTHON -m build
48
- - $PYTHON -m venv test-venv --system-site-packages --symlinks
49
- - test-venv/bin/python -m pip install dist/libvirt_python*.whl
50
- - test-venv/bin/python -m pytest tests
51
- - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
52
- then
53
- unset CFLAGS ;
54
- rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
55
- mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
56
- fi
57
-
58
- include: '/ci/gitlab.yml'
59
-
60
- api_coverage_job:
61
- extends:
62
- - .gitlab_native_build_job
63
- needs:
64
- - job: x86_64-centos-stream-9-git
65
- artifacts: true
66
- stage: sanity_checks
67
- script:
68
- - *git_build_vars
69
- - $PYTHON -m venv test-venv --system-site-packages --symlinks
70
- - test-venv/bin/python -m pip install dist/libvirt_python*.whl
71
- - LIBVIRT_API_COVERAGE=1 test-venv/bin/python -m pytest tests
72
- allow_failure: true
73
- variables:
74
- NAME: centos-stream-9
75
- TARGET_BASE_IMAGE: quay.io/centos/centos:stream9
@@ -1,16 +0,0 @@
1
- # 'git shortlog --help' and look for mailmap for the format of each line
2
-
3
- # Email consolidation:
4
- # <Preferred address in AUTHORS> <other alias used by same author>
5
-
6
- <jdenemar@redhat.com> <Jiri.Denemark@gmail.com>
7
- <jfehlig@suse.com> <jfehlig@novell.com>
8
- <stefanb@us.ibm.com> <stefanb@linux.vnet.ibm.com>
9
-
10
- # Name consolidation:
11
- # Preferred author spelling <preferred email>
12
- Alex Jia <ajia@redhat.com>
13
- Ján Tomko <jtomko@redhat.com>
14
- MATSUDA Daiki <matsudadik@intellilink.co.jp>
15
- Serge E. Hallyn <serge.hallyn@canonical.com>
16
- Philipp Hahn <hahn@univention.de>