Skip to content

Commit

Permalink
add MET_BASE/python to python path for global python environment (use…
Browse files Browse the repository at this point in the history
…d when MET_PYTHON_EXE is not set) so Python Embedding point obs scripts can find met_point_obs without setting PYTHONPATH
  • Loading branch information
georgemccabe committed Dec 23, 2022
1 parent 88759f6 commit 5ad920b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libcode/vx_python3_utils/global_python.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ if ( ! is_initialized ) {
command << cs_erase
<< "sys.path.append(\""
<< replace_path(wrappers_dir)
<< "\");"
<< "sys.path.append(\""
<< replace_path(python_dir)
<< "\")";

run_python_string(command.text());
Expand Down
2 changes: 2 additions & 0 deletions src/libcode/vx_python3_utils/python3_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ static const char user_python_path_env [] = "MET_PYTHON_EXE";

static const char wrappers_dir [] = "MET_BASE/wrappers";

static const char python_dir [] = "MET_BASE/python";


////////////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit 5ad920b

Please sign in to comment.