forked from NCAR/pynio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_py2.sh
31 lines (26 loc) · 745 Bytes
/
build_py2.sh
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
30
#!/bin/sh
export HAS_NETCDF4=1
export HAS_HDFEOS=1
export HAS_HDFEOS5=1
export HAS_GDAL=1
export HAS_GRIB2=1
export NETCDF_PREFIX=${CONDA_PREFIX}
export F2CLIBS=gfortran
export HAS_SZIP=0
export HAS_HDF4=1
export HAS_HDF5=1
export HAS_GDAL=1
export CXXFLAGS="-fPIC $CXXFLAGS"
export LDFLAGS="-L$CONDA_PREFIX/lib $LDFLAGS"
export CPPFLAGS="-I$CONDA_PREFIX/include $CPPFLAGS"
export CFLAGS="-D_BSD_SOURCE -D_XOPEN_SOURCE -I$PREFIX/include $CFLAGS"
if [[ $(uname) == Darwin ]]; then
export CC=gcc
export CXX=g++
export MACOSX_DEPLOYMENT_TARGET="10.9"
export CXXFLAGS="-stdlib=libc++ $CXXFLAGS"
export CXXFLAGS="$CXXFLAGS -stdlib=libc++"
export LDFLAGS="-headerpad_max_install_names $LDFLAGS"
fi
python setup.py build
pip install .