fixed bug in detection of CDF5 library support
see https://github.com/Unidata/netcdf4-python/pull/736
--- netcdf4-python-1.3.1rel/setup.py.orig	2018-01-03 14:38:28.203265462 +0100
+++ netcdf4-python-1.3.1rel/setup.py	2018-01-03 14:39:53.234823671 +0100
@@ -78,10 +78,9 @@
 
         ncmetapath = os.path.join(d,'netcdf_meta.h')
         if os.path.exists(ncmetapath):
-            has_cdf5 = False
             for line in open(ncmetapath):
                 if line.startswith('#define NC_HAS_CDF5'):
-                    has_cdf5 = True
+                    has_cdf5_format = bool(int(line.split()[2]))
         break
 
     return has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended, \
@@ -463,6 +462,7 @@
 if netcdf_lib_version is None:
     sys.stdout.write('unable to detect netcdf library version\n')
 else:
+    netcdf_lib_version = str(netcdf_lib_version)
     sys.stdout.write('using netcdf library version %s\n' % netcdf_lib_version)
 
 cmdclass = {}
@@ -484,6 +484,12 @@
     # this determines whether renameGroup and filepath methods will work.
     has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended, \
         has_cdf5_format, has_nc_open_mem, has_nc_par = check_api(inc_dirs)
+    # for netcdf 4.4.x CDF5 format is always enabled.
+    if netcdf_lib_version is not None and\
+        (netcdf_lib_version > "4.4" and netcdf_lib_version < "4.5"):
+         has_cdf5_format = True
+
+    # disable parallel support if mpi4py not available.
     try:
         import mpi4py
     except ImportError:
