mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-29 17:39:02 +02:00
Add optional $CONDA_HOME environment variable
This commit is contained in:
+8
-3
@@ -22,17 +22,22 @@ if "OPENRAM_HOME" not in os.environ.keys():
|
||||
__path__.insert(0, OPENRAM_HOME)
|
||||
|
||||
|
||||
# Find the conda installation directory
|
||||
# Find the conda installer script
|
||||
if os.path.exists(OPENRAM_HOME + "/install_conda.sh"):
|
||||
CONDA_INSTALLER = OPENRAM_HOME + "/install_conda.sh"
|
||||
CONDA_HOME = OPENRAM_HOME + "/miniconda"
|
||||
elif os.path.exists(OPENRAM_HOME + "/../install_conda.sh"):
|
||||
CONDA_INSTALLER = OPENRAM_HOME + "/../install_conda.sh"
|
||||
CONDA_HOME = os.path.abspath(OPENRAM_HOME + "/../miniconda")
|
||||
# Add CONDA_HOME to environment variables
|
||||
# Override CONDA_HOME if it's set as an environment variable
|
||||
if "CONDA_HOME" in os.environ.keys():
|
||||
CONDA_HOME = os.environ["CONDA_HOME"]
|
||||
# Add CONDA_HOME to environment variables just in case
|
||||
try:
|
||||
os.environ["CONDA_HOME"] = CONDA_HOME
|
||||
except:
|
||||
from openram import debug
|
||||
debug.warning("Couldn't find install_conda.sh")
|
||||
debug.warning("Couldn't find conda setup directory.")
|
||||
|
||||
|
||||
# Import everything in globals.py
|
||||
|
||||
Reference in New Issue
Block a user