forked from Unidata/gempak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
source_python.csh
29 lines (26 loc) · 883 Bytes
/
source_python.csh
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
#
# Make sure NAWIPS directory exists
#
if ( -d /awips2/python ) then
setenv PYHOME "/awips2/python"
set pv = `$PYHOME/bin/python -V |& cut -c8- | cut -d. -f1`
set pr = `$PYHOME/bin/python -V |& cut -c8- | cut -d. -f2`
setenv PYTHONPATH "${PYHOME}/lib/python${pv}.${pr}/site-packages:${NAWIPS}/scripts/python"
else
if($?PYTHONPATH) then
setenv PYTHONPATH "${NAWIPS}/scripts/python:${PYTHONPATH}"
else
setenv PYTHONPATH "${NAWIPS}/scripts/python"
endif
endif
if ( ! -d $NAWIPS ) then
echo "Can not find NAWIPS distribution."
echo 'Check Gemenviron NAWIPS definition ->' $NAWIPS
unsetenv NAWIPS
exit
endif
setenv PYINC "-I${PYHOME}/include/python${pv}.${pr}"
setenv PYLIB "-lpython${pv}.${pr}"
setenv WITHPY "-DWITHPYTHON"
setenv PYDEP "-lpthread -ldl -lutil"
setenv LDFLAGS "-L${PYHOME}/lib -L$OS_LIB -s"