-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathsource_python.sh
More file actions
30 lines (28 loc) · 919 Bytes
/
source_python.sh
File metadata and controls
30 lines (28 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# Make sure NAWIPS directory exists
#
# Python for GEMPAK
if [ -d "/awips2/python" ]; then
export PYHOME="/awips2/python"
pv="`${PYHOME}/bin/python -V 2>&1 | cut -c8- | cut -d. -f1`"
pr="`${PYHOME}/bin/python -V 2>&1 | cut -c8- | cut -d. -f2`"
export PYTHONPATH="${PYHOME}/lib/python${pv}.${pr}/site-packages:${NAWIPS}/scripts/python"
export PYINC="-I${PYHOME}/include/python${pv}.${pr}"
export PYLIB="-lpython${pv}.${pr}"
export WITHPY="-DWITHPYTHON"
export PYDEP="-lpthread -ldl -lutil"
export LDFLAGS="-L${PYHOME}/lib -L$OS_LIB -s"
else
export PYTHONPATH="${NAWIPS}/scripts/python:${PYTHONPATH}"
export PYINC=""
export PYLIB=""
export WITHPY=""
export PYDEP=""
export LDFLAGS="-L$OS_LIB -s"
fi
if [ ! -d $NAWIPS ] ; then
echo "Can not find NAWIPS distribution."
echo 'Check Gemenviron NAWIPS definition ->' $NAWIPS
unset NAWIPS
exit
fi