Skip to content

Commit

Permalink
remove paths to Anaconda installation from include and library search…
Browse files Browse the repository at this point in the history
… paths
  • Loading branch information
lexming committed Feb 10, 2025
1 parent a0ce8f2 commit 02848ea
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions easybuild/easyblocks/a/anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@
class EB_Anaconda(Binary):
"""Support for building/installing Anaconda and Miniconda."""

def __init__(self, *args, **kwargs):
"""Initialize class variables."""
super().__init__(*args, **kwargs)

# Do not add installation to search paths for headers or libraries to avoid
# that the Anaconda environment is used by other software at building or linking time.
# LD_LIBRARY_PATH issue discusses here:
# http://superuser.com/questions/980250/environment-module-cannot-initialize-tcl
mod_env_headers = self.module_load_environment.alias_vars('HEADERS')
mod_env_libs = ['LD_LIBRARY_PATH', 'LIBRARY_PATH']
mod_env_cmake = ['CMAKE_LIBRARY_PATH', 'CMAKE_PREFIX_PATH']
for disallowed_var in mod_env_headers + mod_env_libs + mod_env_cmake:
try:
delattr(self.module_load_environment, disallowed_var)
except AttributeError:
pass
else:
self.log.debug(f"Purposely not updating ${disallowed_var} in {self.name} module file")

def install_step(self):
"""Copy all files in build directory to the install directory"""

Expand Down

0 comments on commit 02848ea

Please sign in to comment.