File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,6 @@ def prepare_for_extensions(self):
495495 self .cfg ['exts_defaultclass' ] = "PythonPackage"
496496 self .cfg ['exts_filter' ] = EXTS_FILTER_PYTHON_PACKAGES
497497
498- set_py_env_vars (self .log )
499-
500498 # don't pass down any build/install options that may have been specified
501499 # 'make' options do not make sense for when building/installing Python libraries (usually via 'python setup.py')
502500 msg = "Unsetting '%s' easyconfig parameter before building/installing extensions: %s"
@@ -814,6 +812,16 @@ def _sanity_check_ebpythonprefixes(self):
814812 raise EasyBuildError ("EasyBuilds sitecustomize.py did not add %s before %s to sys.path (%s)" ,
815813 temp_site_packages_path , base_site_packages_path , paths )
816814
815+ def load_module (self , * args , ** kwargs ):
816+ """(Re)set environment variables after loading module file.
817+
818+ Required here to ensure the variables are also defined for stand-alone installations,
819+ because the environment is reset to the initial environment right before loading the module.
820+ """
821+
822+ super ().load_module (* args , ** kwargs )
823+ set_py_env_vars (self .log )
824+
817825 def sanity_check_step (self ):
818826 """Custom sanity check for Python."""
819827
You can’t perform that action at this time.
0 commit comments