From c4db97433a33bc3030ab371df549993db091595b Mon Sep 17 00:00:00 2001 From: johnxhobbs <54577027+johnxhobbs@users.noreply.github.com> Date: Fri, 6 Oct 2023 12:54:37 +0100 Subject: [PATCH] avoid sys.version in config.py The previous logic breaks when Python 3.10+ is used. Replace with proper version check, as per https://docs.python.org/3/library/sys.html#sys.version --- inst/config/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/config/config.py b/inst/config/config.py index a66dda77f..f0ff8262a 100644 --- a/inst/config/config.py +++ b/inst/config/config.py @@ -5,14 +5,14 @@ # The 'sysconfig' module is only available with Python 2.7 and newer, but # an equivalent module in 'distutils' is available for Python 2.6. -if sys.version < '2.7': +if sys.version_info < (2, 7): from distutils import sysconfig else: import sysconfig # The 'imp' module is deprecated since Python 3.4, and the use of # 'importlib' is recommended instead. -if sys.version < '3.4': +if sys.version_info < (3, 4): import imp def module_path(name): if name in sys.builtin_module_names: