summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-11-12 13:34:14 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2020-11-12 13:34:14 +0000
commit991ecb5de8c8603747a294efa980ec45e4f589d1 (patch)
tree5e7443e9c2c2e138ef6e48662c3afb4d790a9e74 /setup.py
parent2035a5e2f1583a5dd640542e515b6c1812b44056 (diff)
downloadlibvirt-python-991ecb5de8c8603747a294efa980ec45e4f589d1.tar.gz
Avoid truncating python version number when running sanity test
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>
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 5336551..e564fd8 100755
--- a/setup.py
+++ b/setup.py
@@ -283,7 +283,9 @@ class my_test(Command):
if self.plat_name is None:
self.plat_name = get_platform()
- plat_specifier = ".%s-%s" % (self.plat_name, sys.version[0:3])
+ plat_specifier = ".%s-%d.%d" % (self.plat_name,
+ sys.version_info[0],
+ sys.version_info[1])
if hasattr(sys, 'gettotalrefcount'):
plat_specifier += '-pydebug'