Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dedal
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
dedal
Commits
99672be2
Commit
99672be2
authored
1 month ago
by
Adrian Ciu
Browse files
Options
Downloads
Patches
Plain Diff
VT-109: compatibility with esd
parent
f68beec3
No related branches found
No related tags found
No related merge requests found
Pipeline
#62116
passed with stages
Stage:
Stage:
in 38 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dedal/configuration/SpackConfig.py
+3
-1
3 additions, 1 deletion
dedal/configuration/SpackConfig.py
dedal/spack_factory/SpackOperation.py
+10
-10
10 additions, 10 deletions
dedal/spack_factory/SpackOperation.py
with
13 additions
and
11 deletions
dedal/configuration/SpackConfig.py
+
3
−
1
View file @
99672be2
...
@@ -30,12 +30,14 @@ class SpackConfig:
...
@@ -30,12 +30,14 @@ class SpackConfig:
concretization_dir
:
Path
=
None
,
buildcache_dir
:
Path
=
None
,
gpg
:
GpgConfig
=
None
,
concretization_dir
:
Path
=
None
,
buildcache_dir
:
Path
=
None
,
gpg
:
GpgConfig
=
None
,
use_spack_global
=
False
,
cache_version_concretize
=
'
v1
'
,
use_spack_global
=
False
,
cache_version_concretize
=
'
v1
'
,
cache_version_build
=
'
v1
'
,
view
=
SpackViewEnum
.
VIEW
,
override_cache
=
True
,
bashrc_path
=
os
.
path
.
expanduser
(
"
~/.bashrc
"
),
cache_version_build
=
'
v1
'
,
view
=
SpackViewEnum
.
VIEW
,
override_cache
=
True
,
bashrc_path
=
os
.
path
.
expanduser
(
"
~/.bashrc
"
),
spack_cache_storage_type
:
SpackCacheStorageEnum
=
SpackCacheStorageEnum
.
OCI
):
spack_cache_storage_type
:
SpackCacheStorageEnum
=
SpackCacheStorageEnum
.
OCI
,
spack_dir
:
Path
=
None
):
self
.
env
=
env
self
.
env
=
env
if
repos
is
None
:
if
repos
is
None
:
self
.
repos
=
[]
self
.
repos
=
[]
else
:
else
:
self
.
repos
=
repos
self
.
repos
=
repos
self
.
spack_dir
=
spack_dir
self
.
upstream_instance
=
upstream_instance
self
.
upstream_instance
=
upstream_instance
self
.
system_name
=
system_name
self
.
system_name
=
system_name
self
.
concretization_dir
=
concretization_dir
if
concretization_dir
is
None
else
resolve_path
(
concretization_dir
)
self
.
concretization_dir
=
concretization_dir
if
concretization_dir
is
None
else
resolve_path
(
concretization_dir
)
...
...
This diff is collapsed.
Click to expand it.
dedal/spack_factory/SpackOperation.py
+
10
−
10
View file @
99672be2
...
@@ -20,8 +20,7 @@ import subprocess
...
@@ -20,8 +20,7 @@ import subprocess
from
pathlib
import
Path
from
pathlib
import
Path
from
dedal.configuration.SpackConfig
import
SpackConfig
from
dedal.configuration.SpackConfig
import
SpackConfig
from
dedal.enum.SpackConfigCommand
import
SpackConfigCommand
from
dedal.enum.SpackConfigCommand
import
SpackConfigCommand
from
dedal.error_handling.exceptions
import
SpackInstallPackagesException
,
SpackConcertizeException
,
SpackGpgException
,
\
from
dedal.error_handling.exceptions
import
SpackInstallPackagesException
,
SpackConcertizeException
SpackReindexException
from
dedal.logger.logger_builder
import
get_logger
from
dedal.logger.logger_builder
import
get_logger
from
dedal.spack_factory.SpackCacheOperation
import
SpackCacheOperation
from
dedal.spack_factory.SpackCacheOperation
import
SpackCacheOperation
from
dedal.spack_factory.SpackEnvOperation
import
SpackEnvOperation
from
dedal.spack_factory.SpackEnvOperation
import
SpackEnvOperation
...
@@ -50,9 +49,10 @@ class SpackOperation:
...
@@ -50,9 +49,10 @@ class SpackOperation:
self
.
logger
=
logger
self
.
logger
=
logger
self
.
spack_config
.
install_dir
=
spack_config
.
install_dir
self
.
spack_config
.
install_dir
=
spack_config
.
install_dir
os
.
makedirs
(
self
.
spack_config
.
install_dir
,
exist_ok
=
True
)
os
.
makedirs
(
self
.
spack_config
.
install_dir
,
exist_ok
=
True
)
self
.
spack_dir
=
self
.
spack_config
.
install_dir
/
'
spack
'
if
self
.
spack_config
.
spack_dir
is
None
:
self
.
spack_config
.
spack_dir
=
self
.
spack_config
.
install_dir
/
'
spack
'
self
.
env_path
=
None
self
.
env_path
=
None
self
.
spack_setup_script
=
""
if
self
.
spack_config
.
use_spack_global
else
f
"
source
{
self
.
spack_dir
/
'
share
'
/
'
spack
'
/
'
setup-env.sh
'
}
"
self
.
spack_setup_script
=
""
if
self
.
spack_config
.
use_spack_global
else
f
"
source
{
self
.
spack_
config
.
spack_
dir
/
'
share
'
/
'
spack
'
/
'
setup-env.sh
'
}
"
self
.
spack_config
.
concretization_dir
=
spack_config
.
concretization_dir
self
.
spack_config
.
concretization_dir
=
spack_config
.
concretization_dir
if
self
.
spack_config
.
concretization_dir
:
if
self
.
spack_config
.
concretization_dir
:
os
.
makedirs
(
self
.
spack_config
.
concretization_dir
,
exist_ok
=
True
)
os
.
makedirs
(
self
.
spack_config
.
concretization_dir
,
exist_ok
=
True
)
...
@@ -71,7 +71,7 @@ class SpackOperation:
...
@@ -71,7 +71,7 @@ class SpackOperation:
self
.
spack_config
.
env
.
path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
self
.
spack_config
.
env
.
path
.
mkdir
(
parents
=
True
,
exist_ok
=
True
)
self
.
spack_tool_operation
=
SpackToolOperation
(
spack_config
=
spack_config
,
self
.
spack_tool_operation
=
SpackToolOperation
(
spack_config
=
spack_config
,
spack_setup_script
=
self
.
spack_setup_script
,
spack_setup_script
=
self
.
spack_setup_script
,
spack_dir
=
self
.
spack_dir
)
spack_dir
=
self
.
spack_
config
.
spack_
dir
)
self
.
spack_env_operation
=
SpackEnvOperation
(
spack_config
=
spack_config
,
self
.
spack_env_operation
=
SpackEnvOperation
(
spack_config
=
spack_config
,
spack_setup_script
=
self
.
spack_setup_script
,
spack_setup_script
=
self
.
spack_setup_script
,
env_path
=
self
.
env_path
,
env_path
=
self
.
env_path
,
...
@@ -79,7 +79,7 @@ class SpackOperation:
...
@@ -79,7 +79,7 @@ class SpackOperation:
self
.
spack_cache_operation
=
SpackCacheOperation
(
spack_config
=
spack_config
,
self
.
spack_cache_operation
=
SpackCacheOperation
(
spack_config
=
spack_config
,
spack_setup_script
=
self
.
spack_setup_script
,
spack_setup_script
=
self
.
spack_setup_script
,
spack_command_on_env
=
self
.
spack_command_on_env
,
spack_command_on_env
=
self
.
spack_command_on_env
,
spack_dir
=
self
.
spack_dir
)
spack_dir
=
self
.
spack_
config
.
spack_
dir
)
def
setup_spack_env
(
self
):
def
setup_spack_env
(
self
):
"""
"""
...
@@ -89,14 +89,14 @@ class SpackOperation:
...
@@ -89,14 +89,14 @@ class SpackOperation:
set_bashrc_variable
(
'
SYSTEMNAME
'
,
self
.
spack_config
.
system_name
,
self
.
spack_config
.
bashrc_path
,
set_bashrc_variable
(
'
SYSTEMNAME
'
,
self
.
spack_config
.
system_name
,
self
.
spack_config
.
bashrc_path
,
logger
=
self
.
logger
)
logger
=
self
.
logger
)
os
.
environ
[
'
SYSTEMNAME
'
]
=
self
.
spack_config
.
system_name
os
.
environ
[
'
SYSTEMNAME
'
]
=
self
.
spack_config
.
system_name
if
self
.
spack_dir
.
exists
()
and
self
.
spack_dir
.
is_dir
():
if
self
.
spack_
config
.
spack_
dir
.
exists
()
and
self
.
spack_
config
.
spack_
dir
.
is_dir
():
set_bashrc_variable
(
'
SPACK_USER_CACHE_PATH
'
,
str
(
self
.
spack_dir
/
"
.spack
"
),
self
.
spack_config
.
bashrc_path
,
set_bashrc_variable
(
'
SPACK_USER_CACHE_PATH
'
,
str
(
self
.
spack_
config
.
spack_
dir
/
"
.spack
"
),
self
.
spack_config
.
bashrc_path
,
logger
=
self
.
logger
)
logger
=
self
.
logger
)
set_bashrc_variable
(
'
SPACK_USER_CONFIG_PATH
'
,
str
(
self
.
spack_dir
/
"
.spack
"
),
self
.
spack_config
.
bashrc_path
,
set_bashrc_variable
(
'
SPACK_USER_CONFIG_PATH
'
,
str
(
self
.
spack_
config
.
spack_
dir
/
"
.spack
"
),
self
.
spack_config
.
bashrc_path
,
logger
=
self
.
logger
)
logger
=
self
.
logger
)
self
.
logger
.
debug
(
'
Added env variables SPACK_USER_CACHE_PATH and SPACK_USER_CONFIG_PATH
'
)
self
.
logger
.
debug
(
'
Added env variables SPACK_USER_CACHE_PATH and SPACK_USER_CONFIG_PATH
'
)
else
:
else
:
self
.
logger
.
error
(
f
'
Invalid installation path:
{
self
.
spack_dir
}
'
)
self
.
logger
.
error
(
f
'
Invalid installation path:
{
self
.
spack_
config
.
spack_
dir
}
'
)
# Restart the bash after adding environment variables
# Restart the bash after adding environment variables
if
self
.
spack_config
.
env
:
if
self
.
spack_config
.
env
:
self
.
spack_env_operation
.
setup_spack_environment
()
self
.
spack_env_operation
.
setup_spack_environment
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment