From 292aa497bbaec4bff695e44235c19e09b4334a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Rivi=C3=A8re?= Date: Mon, 22 Nov 2021 19:30:54 +0100 Subject: [PATCH] added a "core" distro (#285) --- python/casa_distro/command.py | 2 +- python/casa_distro/configuration_gui.py | 5 +++-- python/casa_distro/container_environment.py | 8 ++++---- python/casa_distro/singularity.py | 2 +- share/distro/core/casa_distro.json | 5 +++++ share/distro/core/conf/bv_maker.cfg | 13 +++++++++++++ 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 share/distro/core/casa_distro.json create mode 100644 share/distro/core/conf/bv_maker.cfg diff --git a/python/casa_distro/command.py b/python/casa_distro/command.py index b9b4519b..de3f1ef6 100644 --- a/python/casa_distro/command.py +++ b/python/casa_distro/command.py @@ -333,7 +333,7 @@ def main(meant_for_container=False): # don't allow command options after a non-kw argument, so that # the remaining is passed as positional arguments and may be used # as part of a sub-command. ex: - # casa_distro run bash -c 'name=brainvisa-opensource printenv name' + # casa_distro run bash -c 'name=brainvisa-core printenv name' # will run the command allows_kwargs = False try: diff --git a/python/casa_distro/configuration_gui.py b/python/casa_distro/configuration_gui.py index 44726d97..0f3cbfdb 100644 --- a/python/casa_distro/configuration_gui.py +++ b/python/casa_distro/configuration_gui.py @@ -935,8 +935,9 @@ def __init__(self, conf, parent=None): 'base casa-distro directory, if the casa_distro command is ' 'used to manage several environments.')), ('distro', traits.Str( - 'opensource', desc='Projects set name. Normally "opensource", ' - '"brainvisa", "cea", "web". Other sets may be defined. ' + 'core', desc='Projects set name. Normally "core", ' + '"opensource", "brainvisa", "cea", "web". Other sets may be ' + 'defined. ' 'Changing it after the initial setup has no effect.')), ('system', traits.Str( '', desc='Name of the Linux system running inside the ' diff --git a/python/casa_distro/container_environment.py b/python/casa_distro/container_environment.py index 3a17b3ae..00e7bd44 100644 --- a/python/casa_distro/container_environment.py +++ b/python/casa_distro/container_environment.py @@ -241,7 +241,7 @@ def setup_user(setup_dir='/casa/setup', rw_install=False, distro=None, 'variables, mount points in the virtual image, etc.') -def setup_dev(setup_dir='/casa/setup', distro='opensource', branch='master', +def setup_dev(setup_dir='/casa/setup', distro='core', branch='master', system=None, image_version=None, image=None, name=None): if not system: system = os.getenv('CASA_SYSTEM') @@ -424,13 +424,13 @@ def setup_dev(setup_dir='/casa/setup', distro='opensource', branch='master', There are two situations, which we could simplify as this: -* opensource distro: if you are only using open-source projects, you can - use the public credentials: +* core distro: if you are only using projects without source restrictions, + you can use the public credentials: Username: brainvisa Password: Soma2009 -* brainvisa and other non-totally opensource distros: they need a +* brainvisa and other distros containing pivate source code: they need a personal login and password. diff --git a/python/casa_distro/singularity.py b/python/casa_distro/singularity.py index 88fc73a7..7b124726 100644 --- a/python/casa_distro/singularity.py +++ b/python/casa_distro/singularity.py @@ -165,7 +165,7 @@ def create_image(base, base_metadata, echo "mv \"$SINGULARITY_CONTAINER\" ~/casa_distro/" echo 'cd ~/casa_distro' echo "singularity run -B ./brainvisa-master:/casa/setup \\\\" - echo " $SINGULARITY_NAME distro=opensource" + echo " $SINGULARITY_NAME distro=core" echo echo 'If you have already setup such an environment, you should' echo 'run the image using appropriate options, mount points, and' diff --git a/share/distro/core/casa_distro.json b/share/distro/core/casa_distro.json new file mode 100644 index 00000000..b29c2cc9 --- /dev/null +++ b/share/distro/core/casa_distro.json @@ -0,0 +1,5 @@ +{ + "casa_distro_compatibility": "3.0", + "name": "core", + "description": "This distro contains the open source core software of BrainVISA suite (non-applicative)." +} diff --git a/share/distro/core/conf/bv_maker.cfg b/share/distro/core/conf/bv_maker.cfg new file mode 100644 index 00000000..e7a70376 --- /dev/null +++ b/share/distro/core/conf/bv_maker.cfg @@ -0,0 +1,13 @@ +[ source $CASA_SRC ] + brainvisa core $CASA_BRANCH + +[ build $CASA_BUILD ] + default_steps = configure build doc + make_options = -j$NCPU + build_type = Release + packaging_thirdparty = OFF + clean_config = ON + clean_build = ON + test_ref_data_dir = $CASA_TESTS/ref + test_run_data_dir = $CASA_TESTS/test + brainvisa core $CASA_BRANCH $CASA_SRC