From 055b203420bdce5198582281b0356a99a99b7693 Mon Sep 17 00:00:00 2001 From: Kyle Mandli Date: Fri, 3 Feb 2012 20:31:07 +0300 Subject: [PATCH] Add clawapps repository support, fix missing error This commit removes the exception that the clawapps environment has not been implemented and now sets an environment variable called CLAWAPPS that points to the appropriate path. It also fixes a bug related to printing out missing project dependencies. --- src/python/setenv.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/python/setenv.py b/src/python/setenv.py index 34ff0dfc..d862e1fd 100755 --- a/src/python/setenv.py +++ b/src/python/setenv.py @@ -166,8 +166,7 @@ def write_env_files(claw_path,verbose=True,outfile_base="setenv", missing_projects = check_repos_dependencies(project,available_projects.keys()) if missing_projects is not None: error_msg = "The project %s depends on the following missing projects:" % project_name - for project in missing_projects: - error_msg += "\n %s" % project + error_msg += ("\n %s" % name for name in missing_projects) # ========================================================================= # Write out out_file_base.csh and out_file_base.sh @@ -217,8 +216,9 @@ def write_env_files(claw_path,verbose=True,outfile_base="setenv", write_environment_variable(csh_file,bash_file,"PYCLAW",available_projects["pyclaw"]) if "clawapps" in available_projects: - raise NotImplementedError("Environment settings not implemented for clawapps!") - + print " CLAWAPPS = %s" % available_projects["clawapps"] + write_environment_variable(csh_file,bash_file,"CLAWAPPS",available_projects["clawapps"]) + if "doc" in available_projects: pass @@ -239,8 +239,7 @@ def write_env_files(claw_path,verbose=True,outfile_base="setenv", write_environment_variable(csh_file,bash_file,"SHARPCLAW",available_projects["sharpclaw"]) if "clawpack-4.x" in available_projects: - # python_path - # = ":".join((os.path.join(available_projects["clawpack-4.x"],"python"),python_path)) + # python_path = ":".join((os.path.join(available_projects["clawpack-4.x"],"python"),python_path)) print " CLAW_4 = %s" % available_projects["clawpack-4.x"] write_environment_variable(csh_file,bash_file,"CLAW_4",available_projects["clawpack-4.x"])