Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Commits
3651dbee
Commit
3651dbee
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
update interface and test logging
parent
62e96e6c
No related branches found
No related tags found
2 merge requests
!19
Move linux-debian11 into main
,
!1
Resolve "First draft for user interface for top level install command"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install-mpsd-software-environment.py
+23
-18
23 additions, 18 deletions
install-mpsd-software-environment.py
with
23 additions
and
18 deletions
install-mpsd-software-environment.py
+
23
−
18
View file @
3651dbee
...
...
@@ -101,11 +101,14 @@ class builder:
def
run
(
self
):
if
self
.
run_mode
==
"
remove
"
:
self
.
remove_toolchains
()
pass
# self.remove_toolchains()
elif
self
.
run_mode
==
"
start_new
"
:
self
.
start_new_env
()
pass
# self.start_new_env()
elif
self
.
run_mode
==
"
install
"
:
self
.
build_toolchains
()
pass
# self.build_toolchains()
else
:
self
.
prepare_env
()
...
...
@@ -116,7 +119,9 @@ class builder:
if
self
.
mpsd_spack_ver
is
None
:
raise
ValueError
(
"
Error: Please specify the release version to install
"
)
if
self
.
toolchain_base_dir
is
None
:
raise
ValueError
(
"
Error: Please specify the target directory for installation
"
)
raise
ValueError
(
"
Error: Please specify the target directory for installation
"
)
if
not
os
.
path
.
exists
(
self
.
toolchain_base_dir
):
os
.
makedirs
(
self
.
toolchain_base_dir
)
else
:
...
...
@@ -136,7 +141,7 @@ class builder:
with
os_chdir
(
"
spack-environments
"
):
subprocess
.
run
([
"
git
"
,
"
checkout
"
,
self
.
mpsd_spack_ver
])
def
install
_toolchains
(
def
build
_toolchains
(
self
,
release
,
install
,
...
...
@@ -208,23 +213,23 @@ def main():
sys
.
exit
(
1
)
if
args
.
remove
:
remove_toolchain
(
args
.
release
,
args
.
remove
)
cmd
=
"
remove
"
elif
args
.
set_up
:
start_new
_env
(
args
.
set_up
,
args
.
from_release
)
cmd
=
"
start_new
"
else
:
target_dir
=
args
.
target_directory
if
args
.
install
:
install_toolchains
(
args
.
release
,
args
.
install
,
target_dir
,
args
.
force_reinstall
,
args
.
skip_build_cache
,
args
.
skip_dir_check
,
)
cmd
=
"
install
"
else
:
prepare_env
(
args
.
skip_dir_check
,
args
.
release
,
target_dir
)
cmd
=
"
prepare_env
"
run
=
builder
(
release
=
args
.
release
,
cmd
=
cmd
,
toolchain_list
=
args
.
install
,
target_dir
=
args
.
target_directory
,
# force_reinstall=args.force_reinstall,
skip_build_cache
=
args
.
skip_build_cache
,
)
run
.
run
()
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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