Skip to content

Commit b75f4f2

Browse files
authored
Merge pull request #4966 from boegel/deprecate_py39
deprecate support for running EasyBuild with Python < 3.9
2 parents d3e75a2 + 00eb564 commit b75f4f2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

easybuild/main.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,21 @@
9393
_log = None
9494

9595

96+
if sys.version_info < (3, 9):
97+
full_py_ver = '.'.join(str(x) for x in sys.version_info[:3])
98+
warning_lines = [
99+
"\033[1;33m"
100+
"WARNING: Running EasyBuild with Python < 3.9 is deprecated (you are using Python %s)" % full_py_ver,
101+
'',
102+
"You should use a more recent Python version to run EasyBuild with,",
103+
"see https://docs.easybuild.io/installation/#more_pip_env_EB_PYTHON for more information."
104+
"\033[0m"
105+
]
106+
# only print the warning if we're not running in GitHub Actions
107+
if os.getenv('GITHUB_ACTIONS') != 'true':
108+
sys.stderr.write('\n' + '\n'.join(warning_lines) + '\n\n')
109+
110+
96111
def find_easyconfigs_by_specs(build_specs, robot_path, try_to_generate, testing=False):
97112
"""Find easyconfigs by build specifications."""
98113
generated, ec_file = obtain_ec_for(build_specs, robot_path, None)

0 commit comments

Comments
 (0)