From 68b6181cd73288a66040f701ef131921e9edcd09 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 26 Aug 2019 15:03:34 +0300 Subject: [PATCH] Fix for Python 3.10 --- tests/lib/test_build.py | 2 +- tests/lib/test_build_ext.py | 2 +- tests/lib3/test_build.py | 2 +- tests/lib3/test_build_ext.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lib/test_build.py b/tests/lib/test_build.py index 901e8ed6..df3f943b 100644 --- a/tests/lib/test_build.py +++ b/tests/lib/test_build.py @@ -2,7 +2,7 @@ if __name__ == '__main__': import sys, os, distutils.util build_lib = 'build/lib' - build_lib_ext = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) + build_lib_ext = os.path.join('build', 'lib.{}-{}.{}'.format(distutils.util.get_platform(), *sys.version_info)) sys.path.insert(0, build_lib) sys.path.insert(0, build_lib_ext) import test_yaml, test_appliance diff --git a/tests/lib/test_build_ext.py b/tests/lib/test_build_ext.py index ff195d51..fa843f6e 100644 --- a/tests/lib/test_build_ext.py +++ b/tests/lib/test_build_ext.py @@ -3,7 +3,7 @@ if __name__ == '__main__': import sys, os, distutils.util build_lib = 'build/lib' - build_lib_ext = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) + build_lib_ext = os.path.join('build', 'lib.{}-{}.{}'.format(distutils.util.get_platform(), *sys.version_info)) sys.path.insert(0, build_lib) sys.path.insert(0, build_lib_ext) import test_yaml_ext, test_appliance diff --git a/tests/lib3/test_build.py b/tests/lib3/test_build.py index 901e8ed6..df3f943b 100644 --- a/tests/lib3/test_build.py +++ b/tests/lib3/test_build.py @@ -2,7 +2,7 @@ if __name__ == '__main__': import sys, os, distutils.util build_lib = 'build/lib' - build_lib_ext = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) + build_lib_ext = os.path.join('build', 'lib.{}-{}.{}'.format(distutils.util.get_platform(), *sys.version_info)) sys.path.insert(0, build_lib) sys.path.insert(0, build_lib_ext) import test_yaml, test_appliance diff --git a/tests/lib3/test_build_ext.py b/tests/lib3/test_build_ext.py index ff195d51..fa843f6e 100644 --- a/tests/lib3/test_build_ext.py +++ b/tests/lib3/test_build_ext.py @@ -3,7 +3,7 @@ if __name__ == '__main__': import sys, os, distutils.util build_lib = 'build/lib' - build_lib_ext = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) + build_lib_ext = os.path.join('build', 'lib.{}-{}.{}'.format(distutils.util.get_platform(), *sys.version_info)) sys.path.insert(0, build_lib) sys.path.insert(0, build_lib_ext) import test_yaml_ext, test_appliance