miniconda: source conda.sh setup script (#28321)
This commit is contained in:
parent
5d56a3b306
commit
e7c9f05cd9
@ -6,6 +6,7 @@
|
||||
from os.path import split
|
||||
|
||||
from spack import *
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
|
||||
class Anaconda2(Package):
|
||||
@ -46,3 +47,7 @@ def install(self, spec, prefix):
|
||||
dir, anaconda_script = split(self.stage.archive_file)
|
||||
bash = which('bash')
|
||||
bash(anaconda_script, '-b', '-f', '-p', self.prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
filename = self.prefix.etc.join('profile.d').join('conda.sh')
|
||||
env.extend(EnvironmentModifications.from_sourcing_file(filename))
|
||||
|
@ -6,6 +6,7 @@
|
||||
from os.path import split
|
||||
|
||||
from spack import *
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
|
||||
class Anaconda3(Package):
|
||||
@ -56,3 +57,7 @@ def install(self, spec, prefix):
|
||||
dir, anaconda_script = split(self.stage.archive_file)
|
||||
bash = which('bash')
|
||||
bash(anaconda_script, '-b', '-f', '-p', self.prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
filename = self.prefix.etc.join('profile.d').join('conda.sh')
|
||||
env.extend(EnvironmentModifications.from_sourcing_file(filename))
|
||||
|
@ -4,6 +4,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
|
||||
class Conda4aarch64(Package):
|
||||
@ -22,3 +23,7 @@ def install(self, spec, prefix):
|
||||
conda_script = self.stage.archive_file
|
||||
bash = which('bash')
|
||||
bash(conda_script, '-b', '-f', '-p', self.prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
filename = self.prefix.etc.join('profile.d').join('conda.sh')
|
||||
env.extend(EnvironmentModifications.from_sourcing_file(filename))
|
||||
|
@ -6,6 +6,7 @@
|
||||
from os.path import split
|
||||
|
||||
from spack import *
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
|
||||
class Miniconda2(Package):
|
||||
@ -28,3 +29,7 @@ def install(self, spec, prefix):
|
||||
dir, script = split(self.stage.archive_file)
|
||||
bash = which('bash')
|
||||
bash(script, '-b', '-f', '-p', self.prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
filename = self.prefix.etc.join('profile.d').join('conda.sh')
|
||||
env.extend(EnvironmentModifications.from_sourcing_file(filename))
|
||||
|
@ -7,6 +7,7 @@
|
||||
from os.path import split
|
||||
|
||||
from spack import *
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
_versions = {
|
||||
'4.10.3': {
|
||||
@ -50,3 +51,7 @@ def install(self, spec, prefix):
|
||||
dir, script = split(self.stage.archive_file)
|
||||
bash = which('bash')
|
||||
bash(script, '-b', '-f', '-p', self.prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
filename = self.prefix.etc.join('profile.d').join('conda.sh')
|
||||
env.extend(EnvironmentModifications.from_sourcing_file(filename))
|
||||
|
Loading…
Reference in New Issue
Block a user