[netcdf4-python] 01/05: Imported Upstream version 1.2.3.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Mar 12 00:50:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository netcdf4-python.

commit 318595f6c4fecd69665e527a3d73a946256251db
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Mar 12 01:33:07 2016 +0100

    Imported Upstream version 1.2.3.1
---
 Changelog                     |  8 ++++++--
 README.md                     |  7 +++++++
 docs/netCDF4/index.html       | 12 ++++++------
 examples/writing_netCDF.ipynb |  2 +-
 man/nc3tonc4.1                |  2 +-
 man/nc4tonc3.1                |  2 +-
 netCDF4/_netCDF4.c            |  8 ++++----
 netCDF4/_netCDF4.pyx          |  8 ++++----
 netCDF4/utils.py              |  4 ++--
 setup.py                      | 14 +++++++++-----
 10 files changed, 41 insertions(+), 26 deletions(-)

diff --git a/Changelog b/Changelog
index 27019a6..5c6af7b 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,9 @@
- version 1.2.3 (not yet released)
- ================================
+ version 1.2.3.1 (tag v1.2.3.1rel)
+==================================
+ * fix bug in setup.py (pull request #539, introduced in issue #518).
+
+ version 1.2.3 (tag v1.2.3rel)
+==============================
  * try to avoid writing NC_STRING attributes if possible, by
    trying to convert unicode strings to ascii and write as NC_CHAR (issue
    #529).  This preserves compatibility with clients (like Matlab) that
diff --git a/README.md b/README.md
index b68995c..55bd7ea 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,13 @@
 ## News
 For the latest updates, see the [Changelog](https://github.com/Unidata/netcdf4-python/blob/master/Changelog).
 
+3/10/2016: Version [1.2.3](https://pypi.python.org/pypi/netCDF4/1.2.3) released. Various bug fixes.
+All text attributes in ``NETCDF4`` formatted files are now written as type ``NC_CHAR``, unless they contain unicode characters that
+cannot be encoded in ascii, in which case they are written as ``NC_STRING``.  Previously,
+all unicode strings were written as ``NC_STRING``. This change preserves compatibility
+with clients, like Matlab, that can't deal with ``NC_STRING`` attributes. 
+A ``setncattr_string`` method was added to force attributes to be written as ``NC_STRING``.
+
 1/1/2016: Version [1.2.2](https://pypi.python.org/pypi/netCDF4/1.2.2) released. Mostly bugfixes, but with two new features.
 
 * support for the new ``NETCDF3_64BIT_DATA`` format introduced in netcdf-c 4.4.0.
diff --git a/docs/netCDF4/index.html b/docs/netCDF4/index.html
index 4733f08..e324e1b 100644
--- a/docs/netCDF4/index.html
+++ b/docs/netCDF4/index.html
@@ -1394,7 +1394,7 @@ OPenDAP support, via the <code>--enable-dap</code> configure option (added in
 version 4.0.1).</p>
 <h2><div id='section2'>2) Groups in a netCDF file.</h2>
 <p>netCDF version 4 added support for organizing data in hierarchical
-groups, which are analagous to directories in a filesystem. Groups serve
+groups, which are analogous to directories in a filesystem. Groups serve
 as containers for variables, dimensions and attributes, as well as other
 groups.  A <a href="#netCDF4.Dataset"><code>Dataset</code></a> defines creates a special group, called
 the 'root group', which is similar to the root directory in a unix
@@ -2770,7 +2770,7 @@ datatype.</p></div>
     <div class="desc"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
 <p>If <code>groupname</code> is specified as a path, using forward slashes as in unix to
 separate components, then intermediate groups will be created as necessary 
-(analagous to <code>mkdir -p</code> in unix).  For example,
+(analogous to <code>mkdir -p</code> in unix).  For example,
 <code>createGroup('/GroupA/GroupB/GroupC')</code> will create <code>GroupA</code>,
 <code>GroupA/GroupB</code>, and <code>GroupA/GroupB/GroupC</code>, if they don't already exist.
 If the specified path describes a group that already exists, no error is
@@ -3448,7 +3448,7 @@ method of a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#net
       
   
     <div class="desc"><p>Groups define a hierarchical namespace within a netCDF file. They are
-analagous to directories in a unix filesystem. Each <a href="#netCDF4.Group"><code>Group</code></a> behaves like
+analogous to directories in a unix filesystem. Each <a href="#netCDF4.Group"><code>Group</code></a> behaves like
 a <a href="#netCDF4.Dataset"><code>Dataset</code></a> within a Dataset, and can contain it's own variables,
 dimensions and attributes (and other Groups). See <a href="#netCDF4.Group.__init__"><code>__init__</code></a>
 for more details.</p>
@@ -3821,7 +3821,7 @@ datatype.</p></div>
     <div class="desc inherited"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
 <p>If <code>groupname</code> is specified as a path, using forward slashes as in unix to
 separate components, then intermediate groups will be created as necessary 
-(analagous to <code>mkdir -p</code> in unix).  For example,
+(analogous to <code>mkdir -p</code> in unix).  For example,
 <code>createGroup('/GroupA/GroupB/GroupC')</code> will create <code>GroupA</code>,
 <code>GroupA/GroupB</code>, and <code>GroupA/GroupB/GroupC</code>, if they don't already exist.
 If the specified path describes a group that already exists, no error is
@@ -4727,7 +4727,7 @@ datatype.</p></div>
     <div class="desc inherited"><p>Creates a new <a href="#netCDF4.Group"><code>Group</code></a> with the given <code>groupname</code>.</p>
 <p>If <code>groupname</code> is specified as a path, using forward slashes as in unix to
 separate components, then intermediate groups will be created as necessary 
-(analagous to <code>mkdir -p</code> in unix).  For example,
+(analogous to <code>mkdir -p</code> in unix).  For example,
 <code>createGroup('/GroupA/GroupB/GroupC')</code> will create <code>GroupA</code>,
 <code>GroupA/GroupB</code>, and <code>GroupA/GroupB/GroupC</code>, if they don't already exist.
 If the specified path describes a group that already exists, no error is
@@ -5541,7 +5541,7 @@ method of a <a href="#netCDF4.Dataset"><code>Dataset</code></a> or <a href="#net
       
   
     <div class="desc"><p>A netCDF <a href="#netCDF4.Variable"><code>Variable</code></a> is used to read and write netCDF data.  They are
-analagous to numpy array objects. See <a href="#netCDF4.Variable.__init__"><code>__init__</code></a> for more
+analogous to numpy array objects. See <a href="#netCDF4.Variable.__init__"><code>__init__</code></a> for more
 details.</p>
 <p>A list of attribute names corresponding to netCDF attributes defined for
 the variable can be obtained with the <a href="#netCDF4.Variable.ncattrs"><code>ncattrs</code></a> method. These
diff --git a/examples/writing_netCDF.ipynb b/examples/writing_netCDF.ipynb
index dd4f729..6c763e4 100644
--- a/examples/writing_netCDF.ipynb
+++ b/examples/writing_netCDF.ipynb
@@ -728,7 +728,7 @@
       "\n",
       "netCDF version 4 added support for organizing data in hierarchical groups.\n",
       "\n",
-      "- analagous to directories in a filesystem. \n",
+      "- analogous to directories in a filesystem. \n",
       "- Groups serve as containers for variables, dimensions and attributes, as well as other groups. \n",
       "- A `netCDF4.Dataset` creates a special group, called the 'root group', which is similar to the root directory in a unix filesystem. \n",
       "\n",
diff --git a/man/nc3tonc4.1 b/man/nc3tonc4.1
index cfccf59..59a1840 100644
--- a/man/nc3tonc4.1
+++ b/man/nc3tonc4.1
@@ -33,7 +33,7 @@ A summary of options is included below.
 Shows a summary of the available options.
 .TP
 .B \-o
-Overwite destination file (default is to raise an error if output file already exists).
+Overwrite destination file (default is to raise an error if output file already exists).
 .TP
 .B \-\-vars
 A comma separated list of variable names to copy (default is to copy all variables).
diff --git a/man/nc4tonc3.1 b/man/nc4tonc3.1
index 02154f4..ee82e67 100644
--- a/man/nc4tonc3.1
+++ b/man/nc4tonc3.1
@@ -27,7 +27,7 @@ A summary of options is included below.
 Shows a summary of the available options.
 .TP
 .B \-o
-Overwite destination file (default is to raise an error if output file already exists).
+Overwrite destination file (default is to raise an error if output file already exists).
 .TP
 .B \-\-quiet=(0|1)
 If set to 1, don't print any diagnostic information.
diff --git a/netCDF4/_netCDF4.c b/netCDF4/_netCDF4.c
index 7175077..708552e 100644
--- a/netCDF4/_netCDF4.c
+++ b/netCDF4/_netCDF4.c
@@ -1880,7 +1880,7 @@ static char __pyx_k_Class_providing_an_interface_to[] = "\nClass providing an in
 static char __pyx_k_FillValue_attribute_must_be_set[] = "_FillValue attribute must be set when variable is ";
 static char __pyx_k_The_vltypes_dictionary_maps_the[] = "The `vltypes` dictionary maps the names of\n    variable-length types defined for the `netCDF4.Group` or `netCDF4.Dataset` to instances of the\n    `netCDF4.VLType` class.";
 static char __pyx_k_Variable_object_no_longer_valid[] = "Variable object no longer valid";
-static char __pyx_k_Version_1_2_3_Introduction_netc[] = "\nVersion 1.2.3\n-------------\n- - - \n\nIntroduction\n============\n\nnetcdf4-python is a Python interface to the netCDF C library.  \n\n[netCDF](http://www.unidata.ucar.edu/software/netcdf/) version 4 has many features\nnot found in earlier versions of the library and is implemented on top of\n[HDF5](http://www.hdfgroup.org/HDF5). This module can read and write\nfiles in both the new netCDF 4 and the old netCDF 3 format, and can [...]
+static char __pyx_k_Version_1_2_3_Introduction_netc[] = "\nVersion 1.2.3\n-------------\n- - - \n\nIntroduction\n============\n\nnetcdf4-python is a Python interface to the netCDF C library.  \n\n[netCDF](http://www.unidata.ucar.edu/software/netcdf/) version 4 has many features\nnot found in earlier versions of the library and is implemented on top of\n[HDF5](http://www.hdfgroup.org/HDF5). This module can read and write\nfiles in both the new netCDF 4 and the old netCDF 3 format, and can [...]
 static char __pyx_k_assign_vlen_method_only_for_use[] = "_assign_vlen method only for use with VLEN variables";
 static char __pyx_k_cannot_set__FillValue_attribute[] = "cannot set _FillValue attribute for VLEN or compound variable";
 static char __pyx_k_cannot_specify_chunksizes_for_a[] = "cannot specify chunksizes for a contiguous dataset";
@@ -16841,7 +16841,7 @@ static PyObject *__pyx_pf_7netCDF4_8_netCDF4_7Dataset_42renameVariable(struct __
 
 /* Python wrapper */
 static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname); /*proto*/
-static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createGroup[] = "\n**`createGroup(self, groupname)`**\n\nCreates a new `netCDF4.Group` with the given `groupname`.\n\nIf `groupname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \n(analagous to `mkdir -p` in unix).  For example,\n`createGroup('/GroupA/GroupB/GroupC')` will create `GroupA`,\n`GroupA/GroupB`, and `GroupA/GroupB/GroupC`, if they don' [...]
+static char __pyx_doc_7netCDF4_8_netCDF4_7Dataset_44createGroup[] = "\n**`createGroup(self, groupname)`**\n\nCreates a new `netCDF4.Group` with the given `groupname`.\n\nIf `groupname` is specified as a path, using forward slashes as in unix to\nseparate components, then intermediate groups will be created as necessary \n(analogous to `mkdir -p` in unix).  For example,\n`createGroup('/GroupA/GroupB/GroupC')` will create `GroupA`,\n`GroupA/GroupB`, and `GroupA/GroupB/GroupC`, if they don' [...]
 static PyObject *__pyx_pw_7netCDF4_8_netCDF4_7Dataset_45createGroup(PyObject *__pyx_v_self, PyObject *__pyx_v_groupname) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
@@ -72271,7 +72271,7 @@ static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Group = {
   0, /*tp_setattro*/
   0, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  "\nGroups define a hierarchical namespace within a netCDF file. They are\nanalagous to directories in a unix filesystem. Each `netCDF4.Group` behaves like\na `netCDF4.Dataset` within a Dataset, and can contain it's own variables,\ndimensions and attributes (and other Groups). See `netCDF4.Group.__init__`\nfor more details.\n\n`netCDF4.Group` inherits from `netCDF4.Dataset`, so all the \n`netCDF4.Dataset` class methods and variables are available\nto a `netCDF4.Group` instance (except t [...]
+  "\nGroups define a hierarchical namespace within a netCDF file. They are\nanalogous to directories in a unix filesystem. Each `netCDF4.Group` behaves like\na `netCDF4.Dataset` within a Dataset, and can contain it's own variables,\ndimensions and attributes (and other Groups). See `netCDF4.Group.__init__`\nfor more details.\n\n`netCDF4.Group` inherits from `netCDF4.Dataset`, so all the \n`netCDF4.Dataset` class methods and variables are available\nto a `netCDF4.Group` instance (except t [...]
   __pyx_tp_traverse_7netCDF4_8_netCDF4_Dataset, /*tp_traverse*/
   __pyx_tp_clear_7netCDF4_8_netCDF4_Dataset, /*tp_clear*/
   0, /*tp_richcompare*/
@@ -73136,7 +73136,7 @@ static PyTypeObject __pyx_type_7netCDF4_8_netCDF4_Variable = {
   __pyx_tp_setattro_7netCDF4_8_netCDF4_Variable, /*tp_setattro*/
   0, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-  "\nA netCDF `netCDF4.Variable` is used to read and write netCDF data.  They are\nanalagous to numpy array objects. See `netCDF4.Variable.__init__` for more\ndetails.\n\nA list of attribute names corresponding to netCDF attributes defined for\nthe variable can be obtained with the `netCDF4.Variable.ncattrs` method. These\nattributes can be created by assigning to an attribute of the\n`netCDF4.Variable` instance. A dictionary containing all the netCDF attribute\nname/value pairs is provi [...]
+  "\nA netCDF `netCDF4.Variable` is used to read and write netCDF data.  They are\nanalogous to numpy array objects. See `netCDF4.Variable.__init__` for more\ndetails.\n\nA list of attribute names corresponding to netCDF attributes defined for\nthe variable can be obtained with the `netCDF4.Variable.ncattrs` method. These\nattributes can be created by assigning to an attribute of the\n`netCDF4.Variable` instance. A dictionary containing all the netCDF attribute\nname/value pairs is provi [...]
   __pyx_tp_traverse_7netCDF4_8_netCDF4_Variable, /*tp_traverse*/
   __pyx_tp_clear_7netCDF4_8_netCDF4_Variable, /*tp_clear*/
   0, /*tp_richcompare*/
diff --git a/netCDF4/_netCDF4.pyx b/netCDF4/_netCDF4.pyx
index 7168a55..2a24c06 100644
--- a/netCDF4/_netCDF4.pyx
+++ b/netCDF4/_netCDF4.pyx
@@ -156,7 +156,7 @@ version 4.0.1).
 ## <div id='section2'>2) Groups in a netCDF file.
 
 netCDF version 4 added support for organizing data in hierarchical
-groups, which are analagous to directories in a filesystem. Groups serve
+groups, which are analogous to directories in a filesystem. Groups serve
 as containers for variables, dimensions and attributes, as well as other
 groups.  A `netCDF4.Dataset` defines creates a special group, called
 the 'root group', which is similar to the root directory in a unix
@@ -2246,7 +2246,7 @@ Creates a new `netCDF4.Group` with the given `groupname`.
 
 If `groupname` is specified as a path, using forward slashes as in unix to
 separate components, then intermediate groups will be created as necessary 
-(analagous to `mkdir -p` in unix).  For example,
+(analogous to `mkdir -p` in unix).  For example,
 `createGroup('/GroupA/GroupB/GroupC')` will create `GroupA`,
 `GroupA/GroupB`, and `GroupA/GroupB/GroupC`, if they don't already exist.
 If the specified path describes a group that already exists, no error is
@@ -2540,7 +2540,7 @@ attribute does not exist on the variable. For example,
 cdef class Group(Dataset):
     """
 Groups define a hierarchical namespace within a netCDF file. They are
-analagous to directories in a unix filesystem. Each `netCDF4.Group` behaves like
+analogous to directories in a unix filesystem. Each `netCDF4.Group` behaves like
 a `netCDF4.Dataset` within a Dataset, and can contain it's own variables,
 dimensions and attributes (and other Groups). See `netCDF4.Group.__init__`
 for more details.
@@ -2796,7 +2796,7 @@ returns `True` if the `netCDF4.Dimension` instance is unlimited, `False` otherwi
 cdef class Variable:
     """
 A netCDF `netCDF4.Variable` is used to read and write netCDF data.  They are
-analagous to numpy array objects. See `netCDF4.Variable.__init__` for more
+analogous to numpy array objects. See `netCDF4.Variable.__init__` for more
 details.
 
 A list of attribute names corresponding to netCDF attributes defined for
diff --git a/netCDF4/utils.py b/netCDF4/utils.py
index 37a3388..27af42e 100644
--- a/netCDF4/utils.py
+++ b/netCDF4/utils.py
@@ -570,7 +570,7 @@ def nc4tonc3():
 
  usage: %s [-h] [-o] [--chunk] netcdf4filename netcdf3filename
  -h -- Print usage message.
- -o -- Overwite destination file (default is to raise an error if output file already exists).
+ -o -- Overwrite destination file (default is to raise an error if output file already exists).
  --quiet=(0|1)  -- if 1, don't print diagnostic information.
  --format -- netcdf3 format to use (NETCDF3_64BIT by default, can be set to NETCDF3_CLASSIC)
  --chunk=(integer) -- number of records along unlimited dimension to
@@ -775,7 +775,7 @@ def nc3tonc4():
 
  usage: %s [-h] [-o] [--vars=var1,var2,..] [--zlib=(0|1)] [--complevel=(1-9)] [--shuffle=(0|1)] [--fletcher32=(0|1)] [--unpackshort=(0|1)] [--quantize=var1=n1,var2=n2,..] netcdf3filename netcdf4filename
  -h -- Print usage message.
- -o -- Overwite destination file (default is to raise an error if output file already exists).
+ -o -- Overwrite destination file (default is to raise an error if output file already exists).
  --vars -- comma separated list of variable names to copy (default is to copy
     all variables)
  --classic=(0|1) -- use NETCDF4_CLASSIC format instead of NETCDF4 (default 1)
diff --git a/setup.py b/setup.py
index f9b14b0..b22d10b 100644
--- a/setup.py
+++ b/setup.py
@@ -241,14 +241,19 @@ if USE_NCCONFIG:
 else:
     retcode = 1
 
-if not retcode:
+try:
+    HAS_PKG_CONFIG = subprocess.call(['pkg-config','--libs', 'hdf5'], stdout=subprocess.PIPE) == 0
+except OSError:
+    HAS_PKG_CONFIG = False
+
+if not retcode: # Try nc-config.
     sys.stdout.write('using nc-config ...\n')
     dep=subprocess.Popen([ncconfig,'--libs'],stdout=subprocess.PIPE).communicate()[0]
     libs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-l' ]
     lib_dirs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-L' ]
     dep=subprocess.Popen([ncconfig,'--cflags'],stdout=subprocess.PIPE).communicate()[0]
     inc_dirs = [str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I']
-elif subprocess.call(['pkg-config','--libs', 'hdf5'],stdout=subprocess.PIPE) == 0:
+elif HAS_PKG_CONFIG: # Try pkg-config.
     sys.stdout.write('using pkg-config ...\n')
     dep=subprocess.Popen(['pkg-config','--libs','netcdf'],stdout=subprocess.PIPE).communicate()[0]
     libs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-l' ]
@@ -260,8 +265,7 @@ elif subprocess.call(['pkg-config','--libs', 'hdf5'],stdout=subprocess.PIPE) ==
     lib_dirs.extend([str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-L' ])
     dep=subprocess.Popen(['pkg-config','--cflags', 'hdf5'],stdout=subprocess.PIPE).communicate()[0]
     inc_dirs.extend([str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I'])
-
-# if nc-config and pkg-config both didn't work (it won't on windows), fall back on brute force method
+# If nc-config and pkg-config both didn't work (it won't on Windows), fall back on brute force method.
 else:
     dirstosearch =  [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local', '/usr']
 
@@ -445,7 +449,7 @@ else:
 
 setup(name = "netCDF4",
   cmdclass = cmdclass,
-  version = "1.2.3",
+  version = "1.2.3.1",
   long_description = "netCDF version 4 has many features not found in earlier versions of the library, such as hierarchical groups, zlib compression, multiple unlimited dimensions, and new data types.  It is implemented on top of HDF5.  This module implements most of the new features, and can read and write netCDF files compatible with older versions of the library.  The API is modelled after Scientific.IO.NetCDF, and should be familiar to users of that module.\n\nThis project has a `Sub [...]
   author            = "Jeff Whitaker",
   author_email      = "jeffrey.s.whitaker at noaa.gov",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf4-python.git



More information about the Pkg-grass-devel mailing list