diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f1c24491..b5bd2fbc 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set version = "4.9.2" %} -{% set build = 9 %} +{% set build = 10 %} # recipe-lint fails if mpi is undefined {% set mpi = mpi or 'nompi' %} @@ -87,7 +87,12 @@ requirements: - aws-sdk-cpp test: + files: + - test_netcdf.py + requires: + - netcdf4 commands: + - python -c "import test_netcdf; test_netcdf.test_netcdf()" - test ! -f ${PREFIX}/lib/libnetcdf.a # [not win] - test -f ${PREFIX}/lib/libnetcdf${SHLIB_EXT} # [not win] - nc-config --all # [not win] diff --git a/recipe/run_test.bat b/recipe/run_test.bat new file mode 100644 index 00000000..ce6a6245 --- /dev/null +++ b/recipe/run_test.bat @@ -0,0 +1 @@ +%PYTHON% -c "import test_netcdf; test_netcdf.test_netcdf()" diff --git a/recipe/test_netcdf.py b/recipe/test_netcdf.py new file mode 100644 index 00000000..be1786e2 --- /dev/null +++ b/recipe/test_netcdf.py @@ -0,0 +1,6 @@ +from netCDF4 import Dataset + + +def test_netcdf(): + nc = Dataset("test_netcdf4_python.nc", mode="w") + nc.close()