summaryrefslogtreecommitdiff
path: root/setup.py
Commit message (Collapse)AuthorAgeFilesLines
* Post-release version bump to 9.4.0Jiri Denemark2023-05-021-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 9.3.0Jiri Denemark2023-04-191-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* setup: limit pytest to 'tests' subdirDaniel P. Berrangé2023-04-191-1/+1
| | | | | | | | | | | | | | | | | | The libvirt git repo contains test data that represents the layout of files in sysfs, which has two subdirs that mutually reference each other with symlinks. When pytest does test discovery it will traverse every directory it finds underneath the libvirt-python checkout. Since we checkout libvirt as a sub-dir, pytest traverses everything in libvirt git and gets stuck in an infinite loop following symlinks in the libvirt test data. Telling pytest to only look at the 'tests' subdir avoids this extra traversal. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Post-release version bump to 9.2.0v9.2.0Jiri Denemark2023-03-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 9.1.0Jiri Denemark2023-01-161-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 9.0.0Jiri Denemark2022-12-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.10.0Jiri Denemark2022-11-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.9.0Jiri Denemark2022-10-031-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Link libvirtmod_* modules also with libvirtv8.8.0Bastian Germann2022-09-091-2/+2
| | | | | | | The -lvirt linker flag has to be added to the libvirtmod_qemu and libvirtmod_lxc modules as well. Signed-off-by: Bastian Germann <bage@linutronix.de>
* Post-release version bump to 8.8.0Jiri Denemark2022-09-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.7.0v8.7.0Jiri Denemark2022-08-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.6.0Jiri Denemark2022-07-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* setup: make 'clean' command compatible again with distutilsv8.5.0Pino Toscano2022-06-251-0/+10
| | | | | | | | | | | | | | | | | | After the switch of 'my_clean' to a simple Command, the 'clean' command has no more bits for options, resulting in distutils (either external or embedded in setuptools) complaining about it: distutils.errors.DistutilsClassError: command class <class '__main__.my_clean'> must provide 'user_options' attribute (a list of tuples) To overcome that, provide all the standard bits from options, i.e. the 'user_options' list, and the 'initialize_options' & 'finalize_options' methods. In addition, add a dummy 'all' option, as distutils wants it: error: error in [...]/.pydistutils.cfg: command 'my_clean' has no such option 'all' Fixes commit a965c91c6fa1275613edbbef75c0422574eb9ff2 Signed-off-by: Pino Toscano <ptoscano@redhat.com>
* setup: advertize Python 3.9 and 3.10 supportDaniel P. Berrangé2022-06-081-0/+2
| | | | | | | Add classifiers that indicate we intend to support python versions 3.9 and 3.10. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: use mocks to allow calling virEventRegisterImpl many timesDaniel P. Berrangé2022-06-081-13/+1
| | | | | | | | | | | | | | We currently have to run each of the test_aio.py test cases in a separate process, because libvirt.virEventRegisterImpl can only be called once per process. This leads to quite unpleasant console output when running tests. By introducing a mock for libvirt.virEventRegisterImpl we can regain the ability to run everything in a single process. The only caveat is that it relies on tests to fully cleanup, but in practice this is ok for our current tests. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* tests: add libvirtaio test coverageChris Gunn2022-06-081-1/+12
| | | | Signed-off-by: Chris Gunn <chrisgun@microsoft.com>
* Post-release version bump to 8.5.0Jiri Denemark2022-06-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.4.0Jiri Denemark2022-05-021-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* setup: switch to running API coverage test using pytestv8.3.0Daniel P. Berrangé2022-04-211-2/+0
| | | | | | The API coverage test is no longer a special case. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* sanitytest: stop passing python module path into sanity testDaniel P. Berrangé2022-04-211-1/+1
| | | | | | | | | | | | | | | | | | We want to move over to make sanitytest.py operate like a more normal test script, which means making it self contained. The setup.py already sets the PYTHONPATH thanks to changes introduced in: commit eaded7bdadf3ccdc4b208ec0ed65a1b23b8b5f69 Author: Daniel P. Berrange <berrange@redhat.com> Date: Tue Mar 18 11:11:48 2014 +0000 Add support for running unit tests with nose so passing the python module path into sanitytest.py is redundant. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* sanitytest: stop passing API XML path into sanity testDaniel P. Berrangé2022-04-211-3/+1
| | | | | | | | | | | We want to move over to make sanitytest.py operate like a more normal test script, which means making it self contained. The test already knows how to find the libvirt API XML path using pkg-config and if an override location is required, this can be done by pointing $PKG_CONFIG_PATH to a suitable place. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: switch from distutils to setuptoolsDaniel P. Berrangé2022-04-211-4/+4
| | | | | | | | | The distutils package is deprecated and targetted for deletion in Python 3.12, so we need to switch to setuptools. Thanks to all the preceeding changes this is no more difficult than changing the import statements. Closes https://gitlab.com/libvirt/libvirt-python/-/issues/1 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: remove use of distutils.util.get_platformDaniel P. Berrangé2022-04-211-15/+24
| | | | | | | | | | The 'get_platform' function is used to determine the platform specific component of the build output directory containing the loadable modules and python code. There is no nice replacement for this function, but we can achieve our goal by simply scaning for the desired subdirectory, which should exist by the time 'test' runs. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: override 'build_ext' / 'build_py' commands rather than 'build'Daniel P. Berrangé2022-04-211-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | We override the 'build' command to invoke the code generator before the extensions are compiled. The 'build' command, however, is merely a wrapper around several other commands. It is possible for the user to directly invoke those commands, in which case our code generator won't get a chance to run: $ python setup.py build_ext running build_ext building 'libvirtmod' extension creating build/temp.linux-x86_64-3.10 creating build/temp.linux-x86_64-3.10/build gcc ..snip... -c build/libvirt.c -o build/temp.linux-x86_64-3.10/build/libvirt.o cc1: fatal error: build/libvirt.c: No such file or directory compilation terminated. error: command '/usr/lib64/ccache/gcc' failed with exit code 1 To solve this we instead override 'build_ext' and 'build_py'. This in turn means we call the generator to emit C code separately from Python code. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: replace distutils.dir_util.remove_tree with shutilsDaniel P. Berrangé2022-04-211-2/+1
| | | | | | | The distutils.dir_util.remove_tree method has no compelling benefit over using the standard python shutils module. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: replace distutils.spawn with subprocessDaniel P. Berrangé2022-04-211-16/+13
| | | | | | | The distutils.spawn method has no compelling benefit over using the standard python subprocess module. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: replace distutils.spawn.find_executable with shutilsDaniel P. Berrangé2022-04-211-2/+1
| | | | | | | The distutils.spawn.find_executable method has no compelling benefit over using the standard python shutils module. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: introduce an explicit check for pkg-config operationDaniel P. Berrangé2022-04-211-16/+16
| | | | | | | | Instead of searching for the pkg-config binary manually, just try to run it and catch the exception raised if it isn't found. Use the --version flag as a way to validate that it is at least somewhat functional. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: stop inheriting from 'clean' commandDaniel P. Berrangé2022-04-211-4/+1
| | | | | | | | | The default 'clean' command impl deletes only intermediate files from the 'build' directory. We've overridden it to delete everything. There is no benefit in inheriting from the default impl, given our subclass will delete everything. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: drop the 'rpm' commandDaniel P. Berrangé2022-04-211-21/+0
| | | | | | | This duplicates funtionality already provided by the 'bdist_rpm' command. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Post-release version bump to 8.3.0Jiri Denemark2022-04-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.2.0Jiri Denemark2022-03-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.1.0Jiri Denemark2022-01-141-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 8.0.0Jiri Denemark2021-12-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.10.0Jiri Denemark2021-11-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.9.0Jiri Denemark2021-10-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.8.0Jiri Denemark2021-09-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.7.0v7.7.0Jiri Denemark2021-08-021-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.6.0Jiri Denemark2021-07-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.5.0Jiri Denemark2021-06-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.4.0Jiri Denemark2021-05-271-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Don't run sanity checks by defaultDaniel P. Berrangé2021-04-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The sanity check scripts verify that the binding covers all APIs in the libvirt library/headers being built against. This is primarily there for libvirt maintainers to identify when there are gaps in API coverage. This is not something downstream consumers of libvirt-python should be running themselves, so we shouldn't added it to tests by default. In addition if people are working on branches or submitting merge requests for python changes, we shouldn't block their work for failed API coverage sanity tests, if the python binding otherwise builds fine and passes regular unit tests. Thus, we introduce a new gitlab job "api-coverage" with some conditions: - If pushing to a branch, the job is treated as non-fatal - For regular scheduled builds, it is mandatory - Don't run in any other scenarios This job uses the artifacts from the centos-8-git-build job and re-runs the test suite, requesting the sanity tests to be run too. This will achieve the result of letting us see missing API coverage in nightly builds, without blocking other contributions. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* setup: use pytest instead of nose to run the test suiteJán Tomko2021-04-071-8/+8
| | | | | | | | | | | | The software we use for running tests - nose - has been deprecated in favor of nose2. We don't use anything nose-specific, just unittest.TestCase, which pytest can handle just fine. Switch to using pytest, which we already use for libvirt-dbus. Signed-off-by: Ján Tomko <jtomko@redhat.com>
* setup: drop have_libvirtaioJán Tomko2021-04-071-10/+2
| | | | | | | This function says we have libvirtaio on Python >= 3.3, however we already mandate Python >= 3.5 at the start of the file. Signed-off-by: Ján Tomko <jtomko@redhat.com>
* Post-release version bump to 7.3.0Jiri Denemark2021-04-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.2.0v7.2.0Jiri Denemark2021-03-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.1.0Jiri Denemark2021-01-151-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Post-release version bump to 7.0.0Jiri Denemark2020-12-011-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
* Avoid truncating python version number when running sanity testDaniel P. Berrangé2020-11-121-1/+3
| | | | | | | The current code assumes the version number string will be only three characters long, which fails with "3.10". Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Post-release version bump to 6.10.0Jiri Denemark2020-11-021-1/+1
| | | | Signed-off-by: Jiri Denemark <jdenemar@redhat.com>