From e6ca241ee3ef105a8e8ae96928949499bb396c5b Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:36:00 +0100 Subject: [PATCH 1/3] support Python 2 in `openssl_wrapper.py` At least for a short time --- easybuild/easyblocks/o/openssl_wrapper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openssl_wrapper.py b/easybuild/easyblocks/o/openssl_wrapper.py index d776c43a02..de7f4314eb 100644 --- a/easybuild/easyblocks/o/openssl_wrapper.py +++ b/easybuild/easyblocks/o/openssl_wrapper.py @@ -30,7 +30,11 @@ import os import re -from urllib.parse import urlparse +# support python2 +try: + from urllib.parse import urlparse +except ImportError: + from urlparse import urlparse from easybuild.tools import LooseVersion From 0106f19c3bd3d0cdb562e85f55dd51d7be93426e Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:37:16 +0100 Subject: [PATCH 2/3] indentation --- easybuild/easyblocks/o/openssl_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openssl_wrapper.py b/easybuild/easyblocks/o/openssl_wrapper.py index de7f4314eb..904c18c7a2 100644 --- a/easybuild/easyblocks/o/openssl_wrapper.py +++ b/easybuild/easyblocks/o/openssl_wrapper.py @@ -34,7 +34,7 @@ try: from urllib.parse import urlparse except ImportError: - from urlparse import urlparse + from urlparse import urlparse from easybuild.tools import LooseVersion From d19ca44a2a2f8c01d813160e2b950a5c53626070 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:02:50 +0100 Subject: [PATCH 3/3] clearer comment Co-authored-by: Kenneth Hoste --- easybuild/easyblocks/o/openssl_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/o/openssl_wrapper.py b/easybuild/easyblocks/o/openssl_wrapper.py index 904c18c7a2..780fc26466 100644 --- a/easybuild/easyblocks/o/openssl_wrapper.py +++ b/easybuild/easyblocks/o/openssl_wrapper.py @@ -30,10 +30,10 @@ import os import re -# support python2 try: from urllib.parse import urlparse except ImportError: + # fallback for Python 2.7, should be removed for EasyBuild >= 5.0 from urlparse import urlparse from easybuild.tools import LooseVersion