From f7de590be2af5e485d62c2f520e04fc55aa5cd4f Mon Sep 17 00:00:00 2001 From: Grigory Sharov Date: Sun, 1 Nov 2020 13:48:28 +0000 Subject: [PATCH 1/2] fix csh installation with conda --- scipioninstaller/installer.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scipioninstaller/installer.py b/scipioninstaller/installer.py index 1f10f83..be33405 100644 --- a/scipioninstaller/installer.py +++ b/scipioninstaller/installer.py @@ -62,11 +62,18 @@ def getCondaCmd(scipionEnv, noAsk): def getCondaInitCmd(): shell = os.path.basename(os.environ.get("SHELL", "bash")) - return 'eval "$(%s shell.%s hook)"' % (checkProgram(CONDA), shell) + if shell in ["csh", "tcsh"]: + return 'set cinit="`%s shell.%s hook`" && eval "$cinit"' % (checkProgram(CONDA), shell) + else: + return 'eval "$(%s shell.%s hook)"' % (checkProgram(CONDA), shell) def getCondaenvActivationCmd(scipionEnv): - return "conda activate %s" % scipionEnv + shell = os.path.basename(os.environ.get("SHELL", "bash")) + if shell in ["csh", "tcsh"]: + return 'set cact="`%s shell.%s activate %s`" && eval "$cact"' % (checkProgram(CONDA), shell, scipionEnv) + else: + return "conda activate %s" % scipionEnv def cmdfy(cmd, sep=CMD_SEP): From a9a8d15df8ff6bcc7f7a5f8950fdb1305a9dfb2e Mon Sep 17 00:00:00 2001 From: Grigory Sharov Date: Sun, 1 Nov 2020 14:01:50 +0000 Subject: [PATCH 2/2] bump version --- CHANGES.txt | 2 +- scipioninstaller/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5eec3f5..2fea67a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,3 @@ - +1.0.10 - fix csh/tcsh installations 19-December-2019 - First version of the scipion installer diff --git a/scipioninstaller/__init__.py b/scipioninstaller/__init__.py index 89baa44..53599cd 100644 --- a/scipioninstaller/__init__.py +++ b/scipioninstaller/__init__.py @@ -1,2 +1,2 @@ INSTALL_ENTRY = 'installscipion' -__version__ = '1.0.9' +__version__ = '1.0.10'