Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #2388 Fix Python environment issue #2407

Merged
merged 16 commits into from Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9e8b8e2
print python executable used to run when running without MET_PYTHON_EXE
georgemccabe Dec 23, 2022
6246c25
Revert "print python executable used to run when running without MET_…
georgemccabe Dec 23, 2022
3910cad
print python executable used to run when running without MET_PYTHON_EXE
georgemccabe Dec 23, 2022
88759f6
add MET_BASE/python to python path so met_point_obs can be found my P…
georgemccabe Dec 23, 2022
5ad920b
add MET_BASE/python to python path for global python environment (use…
georgemccabe Dec 23, 2022
14d787a
Example call to force set Python executable used in global python cal…
georgemccabe Dec 23, 2022
ebcf2c4
Merge branch 'develop' of github.com:dtcenter/MET into develop
georgemccabe Jan 9, 2023
9718ad4
Merge branch 'develop' of github.com:dtcenter/MET into develop
georgemccabe Jan 12, 2023
11cd6c1
Merge branch 'develop' into feature_2388_python_env
georgemccabe Jan 12, 2023
9b5cd1f
Per #2388, make MET_PYTHON_BIN_EXE a required configuration setting f…
JohnHalleyGotway Jan 12, 2023
ba40fb9
Per #2388, switch MET_PYTHON_BIN_EXE help message to be more consiste…
JohnHalleyGotway Jan 12, 2023
7081535
Per #2388, add MET_PYTHON_BIN_EXE to the documentation.
JohnHalleyGotway Jan 12, 2023
e251079
Per #2388, if not already set, set MET_PYTHON_BIN_EXE = /opt/local/Li…
JohnHalleyGotway Jan 12, 2023
0ac332a
set MET_PYTHON_BIN_EXE in docker env
georgemccabe Jan 13, 2023
c3482c2
Merge branch 'develop' of github.com:dtcenter/MET into develop
georgemccabe Jan 13, 2023
740939e
Merge branch 'develop' into feature_2388_python_env
georgemccabe Jan 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.in
Expand Up @@ -274,6 +274,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
32 changes: 29 additions & 3 deletions configure
Expand Up @@ -746,6 +746,7 @@ MET_GSLINC
MET_GSL
MET_PYTHON_LD
MET_PYTHON_CC
MET_PYTHON_BIN_EXE
GRIB2CLIB_NAME
MET_GRIB2CLIB
MET_GRIB2CINC
Expand Down Expand Up @@ -897,6 +898,7 @@ MET_GRIB2C
MET_GRIB2CINC
MET_GRIB2CLIB
GRIB2CLIB_NAME
MET_PYTHON_BIN_EXE
MET_PYTHON_CC
MET_PYTHON_LD
MET_GSL
Expand Down Expand Up @@ -1647,13 +1649,16 @@ Some influential environment variables:
Name of grib2c library to link with. For example,
-lgrib2c_v1.6.0 or -lgrib2c, etc. If it is -lgrib2c, you don't
have to specify it.
MET_PYTHON_BIN_EXE
Full path to the python executable corresponding to
MET_PYTHON_CC and MET_PYTHON_LD, e.g. /usr/bin/python3.
MET_PYTHON_CC
Where the python header files are located, e.g. -I<include dir>.
Set to the output of 'python-config --cflags'.
Set to the output of 'python3-config --cflags'.
MET_PYTHON_LD
Where the python library files are located, e.g. -L<lib dir>,
followed by the python library names, e.g. -l<library>. Set to
the output of 'python-config --ldflags'.
the output of 'python3-config --ldflags'.
MET_GSL Where gsl lib and include subdirectories are located. If they
are installed in /usr/local, you don't have to specify them.
MET_GSLINC Where gsl include files are located. Use if the libraries and
Expand Down Expand Up @@ -4648,14 +4653,35 @@ if test -n "$MET_GRIB2CLIB"; then
fi

#
# Look for the PYTHON library
# Look for the PYTHON executable and library
#

# Configure the variables. The help text will appear if the user uses "configure --help".





# Ensure that all or none are specified.

if (test -n "$MET_PYTHON_BIN_EXE" || \
test -n "$MET_PYTHON_CC" || \
test -n "$MET_PYTHON_LD"); then
if test -z "$MET_PYTHON_BIN_EXE"; then
as_fn_error $? "MET_PYTHON_CC or MET_PYTHON_LD environment variable set, but MET_PYTHON_BIN_EXE not set. If one of these variables is set, then all must be set." "$LINENO" 5
elif test -z "$MET_PYTHON_CC"; then
as_fn_error $? "MET_PYTHON_BIN_EXE or MET_PYTHON_LD environment variable set, but MET_PYTHON_CC not set. If one of these variables is set, then all must be set." "$LINENO" 5
elif test -z "$MET_PYTHON_LD"; then
as_fn_error $? "MET_PYTHON_BIN_EXE or MET_PYTHON_CC environment variable set, but MET_PYTHON_LD not set. If one of these variables is set, then all must be set." "$LINENO" 5
fi
fi

# Add MET_PYTHON_BIN_EXE to the CPPFLAGS

if test -n "$MET_PYTHON_BIN_EXE"; then
CPPFLAGS=$CPPFLAGS' -DMET_PYTHON_BIN_EXE="\"${MET_PYTHON_BIN_EXE}\""'
fi

if test -n "$MET_PYTHON_CC"; then
CPPFLAGS="${CPPFLAGS} -I../../basic/vx_log -I../../basic/vx_util ${MET_PYTHON_CC}"
fi
Expand Down
27 changes: 24 additions & 3 deletions configure.ac
Expand Up @@ -155,13 +155,34 @@ if test -n "$MET_GRIB2CLIB"; then
fi

#
# Look for the PYTHON library
# Look for the PYTHON executable and library
#

# Configure the variables. The help text will appear if the user uses "configure --help".

AC_ARG_VAR([MET_PYTHON_CC], [Where the python header files are located, e.g. -I<include dir>. Set to the output of 'python-config --cflags'.])
AC_ARG_VAR([MET_PYTHON_LD], [Where the python library files are located, e.g. -L<lib dir>, followed by the python library names, e.g. -l<library>. Set to the output of 'python-config --ldflags'.])
AC_ARG_VAR([MET_PYTHON_BIN_EXE], [Full path to the python executable corresponding to MET_PYTHON_CC and MET_PYTHON_LD, e.g. /usr/bin/python3.])
AC_ARG_VAR([MET_PYTHON_CC], [Where the python header files are located, e.g. -I<include dir>. Set to the output of 'python3-config --cflags'.])
AC_ARG_VAR([MET_PYTHON_LD], [Where the python library files are located, e.g. -L<lib dir>, followed by the python library names, e.g. -l<library>. Set to the output of 'python3-config --ldflags'.])

# Ensure that all or none are specified.

if (test -n "$MET_PYTHON_BIN_EXE" || \
test -n "$MET_PYTHON_CC" || \
test -n "$MET_PYTHON_LD"); then
if test -z "$MET_PYTHON_BIN_EXE"; then
AC_MSG_ERROR([MET_PYTHON_CC or MET_PYTHON_LD environment variable set, but MET_PYTHON_BIN_EXE not set. If one of these variables is set, then all must be set.])
elif test -z "$MET_PYTHON_CC"; then
AC_MSG_ERROR([MET_PYTHON_BIN_EXE or MET_PYTHON_LD environment variable set, but MET_PYTHON_CC not set. If one of these variables is set, then all must be set.])
elif test -z "$MET_PYTHON_LD"; then
AC_MSG_ERROR([MET_PYTHON_BIN_EXE or MET_PYTHON_CC environment variable set, but MET_PYTHON_LD not set. If one of these variables is set, then all must be set.])
fi
fi

# Add MET_PYTHON_BIN_EXE to the CPPFLAGS

if test -n "$MET_PYTHON_BIN_EXE"; then
CPPFLAGS=$CPPFLAGS' -DMET_PYTHON_BIN_EXE="\"${MET_PYTHON_BIN_EXE}\""'
fi

if test -n "$MET_PYTHON_CC"; then
CPPFLAGS="${CPPFLAGS} -I../../basic/vx_log -I../../basic/vx_util ${MET_PYTHON_CC}"
Expand Down
1 change: 1 addition & 0 deletions data/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/climo/Makefile.in
Expand Up @@ -249,6 +249,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/climo/seeps/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/colortables/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/colortables/NCL_colortables/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/config/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/map/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/map/admin_by_country/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/poly/HMT_masks/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/poly/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/poly/NCEP_masks/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/ps/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/table_files/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/tc_data/Makefile.in
Expand Up @@ -219,6 +219,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/wrappers/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions data/wrappers/set_python_env.py
Expand Up @@ -7,3 +7,4 @@
import os
import sys
import numpy as np
print(f'Python executable: {sys.executable}')
4 changes: 4 additions & 0 deletions data/wrappers/write_tmp_dataplane.py
Expand Up @@ -21,6 +21,10 @@
pyembed_module_name = sys.argv[2]
sys.argv = sys.argv[2:]

# add share/met/python directory to system path to find met_point_obs
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir, 'python')))

# append user script dir to system path
pyembed_dir, pyembed_file = os.path.split(pyembed_module_name)
if pyembed_dir:
Expand Down
4 changes: 4 additions & 0 deletions data/wrappers/write_tmp_mpr.py
Expand Up @@ -20,6 +20,10 @@
pyembed_module_name = sys.argv[2]
sys.argv = sys.argv[2:]

# add share/met/python directory to system path to find met_point_obs
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir, 'python')))

# append user script dir to system path
pyembed_dir, pyembed_file = os.path.split(pyembed_module_name)
if pyembed_dir:
Expand Down
4 changes: 4 additions & 0 deletions data/wrappers/write_tmp_point.py
Expand Up @@ -20,6 +20,10 @@
pyembed_module_name = sys.argv[2]
sys.argv = sys.argv[2:]

# add share/met/python directory to system path to find met_point_obs
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir, 'python')))

# append user script dir to system path
pyembed_dir, pyembed_file = os.path.split(pyembed_module_name)
if pyembed_dir:
Expand Down
4 changes: 3 additions & 1 deletion docs/Users_Guide/appendixF.rst
Expand Up @@ -16,7 +16,9 @@ In order to use Python embedding, the user's local Python installation must have

The local Python installation must also support a minimum set of required packages. The MET build includes some python wrapper scripts to facilitate the passing of data in memory as well as the reading and writing of temporary files. The packages required by those wrapper scripts are **sys, os, argparse, importlib, numpy and netCDF4**. While most of these are standard packages and readily available, numpy and netCDF4 may not be. Users are advised to confirm their availability prior to compiling MET with python embedding support.

In addition to the **configure** option mentioned above, two variables, **MET_PYTHON_CC** and **MET_PYTHON_LD**, must also be set for the configuration process. These may either be set as environment variables or as command line options to **configure**. These constants are passed as compiler command line options when building MET to enable the compiler to find the requisite Python header files and libraries in the user's local filesystem. Fortunately, Python provides a way to set these variables properly. This frees the user from the necessity of having any expert knowledge of the compiling and linking process. Along with the **Python** executable, there should be another executable called **python3-config**, whose output can be used to set these environment variables as follows:
In addition to the **configure** option mentioned above, three variables, **MET_PYTHON_BIN_EXE**, **MET_PYTHON_CC**, and **MET_PYTHON_LD**, must also be set for the configuration process. These may either be set as environment variables or as command line options to **configure**. These constants are passed as compiler command line options when building MET to enable the compiler to find the requisite Python executable, header files, and libraries in the user's local filesystem. Fortunately, Python provides a way to set these variables properly. This frees the user from the necessity of having any expert knowledge of the compiling and linking process. Along with the **Python** executable, there should be another executable called **python3-config**, whose output can be used to set these environment variables as follows:

• Set **MET_PYTHON_BIN_EXE** to the full path of the desired python executable.

• On the command line, run "**python3-config --cflags**". Set the value of **MET_PYTHON_CC** to the output of that command.

Expand Down
3 changes: 2 additions & 1 deletion docs/Users_Guide/installation.rst
Expand Up @@ -201,10 +201,11 @@ The following environment variables should also be set:

* If compiling support for GRIB2, set $MET_GRIB2CINC and $MET_GRIB2CLIB to point to the main GRIB2C directory which contains both the include and library files. These are used instead of $MET_GRIB2C since the main GRIB2C directory does not contain include and lib subdirectories.

* If compiling support for PYTHON, set $MET_PYTHON_CC and $MET_PYTHON_LD to specify the compiler (-I) and linker (-L) flags required for python. Set $MET_PYTHON_CC for the directory containing the "Python.h" header file. Set $MET_PYTHON_LD for the directory containing the python library file and indicate the name of that file. For example:
* If compiling support for PYTHON, set $MET_PYTHON_BIN_EXE to specify the desired python executable to be used. Also set $MET_PYTHON_CC, and $MET_PYTHON_LD to specify the compiler (-I) and linker (-L) flags required for python. Set $MET_PYTHON_CC for the directory containing the "Python.h" header file. Set $MET_PYTHON_LD for the directory containing the python library file and indicate the name of that file. For example:

.. code-block:: none

MET_PYTHON_BIN_EXE='/usr/bin/python3.6'
MET_PYTHON_CC='-I/usr/include/python3.6'
MET_PYTHON_LD='-L/usr/lib/python3.6/config-x86_64-linux-gnu -lpython3.6m'

Expand Down
2 changes: 1 addition & 1 deletion internal/scripts/environment/development.docker
Expand Up @@ -23,7 +23,7 @@ export MET_FREETYPEINC=/usr/include/freetype2
export MET_FREETYPELIB=/usr/lib64
export MET_JASPERLIB=/usr/lib64

export MET_PYTHON=/usr/bin/python3
export MET_PYTHON_BIN_EXE=/usr/bin/python3
export MET_PYTHON_CC="-I/usr/include/python3.6m"
export MET_PYTHON_LD="-L/usr/lib64 -lpython3.6m -lpthread -ldl -lutil -lm"

Expand Down
1 change: 1 addition & 0 deletions internal/scripts/environment/development.seneca
Expand Up @@ -23,6 +23,7 @@ export MET_JASPER=${MET_DST}/jasper-1.900.1

# For Python 3 in met-9.0
export MET_PYTHON=/usr/local/met-python3
export MET_PYTHON_BIN_EXE=${MET_PYTHON}/bin/python3.8
export MET_PYTHON_CC="-I${MET_PYTHON}/include/python3.8"
export MET_PYTHON_LD="-L${MET_PYTHON}/lib -lpython3.8 -lcrypt -lpthread -ldl -lutil -lm"

Expand Down
4 changes: 2 additions & 2 deletions internal/scripts/installation/compile_MET_all.sh
Expand Up @@ -10,8 +10,7 @@
# and USE_MODULES.
#
# If compiling support for Python embedding, users will need to
# set MET_PYTHON, MET_PYTHON_CC, and
# MET_PYTHON_LD.
# set MET_PYTHON, MET_PYTHON_BIN_EXE, MET_PYTHON_CC, and MET_PYTHON_LD.
#
# For a description of these and other variables, visit the MET
# downloads page under "Sample Script For Compiling External
Expand Down Expand Up @@ -821,6 +820,7 @@ if [ $COMPILE_MET -eq 1 ]; then
export MET_GSL=${LIB_DIR}
fi

export MET_PYTHON_BIN_EXE=${MET_PYTHON_BIN_EXE:=${MET_PYTHON}/bin/python3}
export MET_PYTHON_LD=${MET_PYTHON_LD}
export MET_PYTHON_CC=${MET_PYTHON_CC}
export LDFLAGS="-Wl,--disable-new-dtags"
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/Makefile.in
Expand Up @@ -249,6 +249,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/basic/Makefile.in
Expand Up @@ -249,6 +249,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/basic/vx_config/Makefile.in
Expand Up @@ -274,6 +274,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/basic/vx_log/Makefile.in
Expand Up @@ -243,6 +243,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/basic/vx_util/Makefile.in
Expand Up @@ -279,6 +279,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/libcode/Makefile.in
Expand Up @@ -249,6 +249,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/libcode/vx_data2d/Makefile.in
Expand Up @@ -247,6 +247,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down
1 change: 1 addition & 0 deletions internal/test_util/libcode/vx_data2d_factory/Makefile.in
Expand Up @@ -245,6 +245,7 @@ MET_HDFLIB = @MET_HDFLIB@
MET_NETCDF = @MET_NETCDF@
MET_NETCDFINC = @MET_NETCDFINC@
MET_NETCDFLIB = @MET_NETCDFLIB@
MET_PYTHON_BIN_EXE = @MET_PYTHON_BIN_EXE@
MET_PYTHON_CC = @MET_PYTHON_CC@
MET_PYTHON_LD = @MET_PYTHON_LD@
MKDIR_P = @MKDIR_P@
Expand Down