[Git][debian-gis-team/pyninjotiff][master] 5 commits: New upstream version 0.4.5

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Jan 17 16:16:51 GMT 2026



Antonio Valentino pushed to branch master at Debian GIS Project / pyninjotiff


Commits:
686e921c by Antonio Valentino at 2026-01-17T16:09:52+00:00
New upstream version 0.4.5
- - - - -
45c3bfd7 by Antonio Valentino at 2026-01-17T16:09:53+00:00
Update upstream source from tag 'upstream/0.4.5'

Update to upstream version '0.4.5'
with Debian dir beaf0da763783df169ad5a78c72a9428859cfc07
- - - - -
1acd41ee by Antonio Valentino at 2026-01-17T16:10:25+00:00
New upstream release

- - - - -
5fa78e2b by Antonio Valentino at 2026-01-17T16:11:15+00:00
Update dates in d/copyright

- - - - -
7aba368b by Antonio Valentino at 2026-01-17T16:11:43+00:00
Set distribution to unstable

- - - - -


6 changed files:

- .github/workflows/deploy-sdist.yaml
- − .github/workflows/test-deploy-sdist.yaml
- CHANGELOG.md
- debian/changelog
- debian/copyright
- pyninjotiff/tifffile.py


Changes:

=====================================
.github/workflows/deploy-sdist.yaml
=====================================
@@ -1,6 +1,8 @@
 name: Deploy sdist
 
 on:
+  push:
+  pull_request:
   release:
     types:
       - published
@@ -13,11 +15,11 @@ jobs:
       - name: Checkout source
         uses: actions/checkout at v5
 
-      - name: Create sdist
+      - name: Create dist packages
         shell: bash -l {0}
         run: |
-          python -m pip install -q build
-          python -m build -s
+          pip install hatch
+          hatch build
 
       - name: Publish package to PyPI
         if: github.event.action == 'published'


=====================================
.github/workflows/test-deploy-sdist.yaml deleted
=====================================
@@ -1,21 +0,0 @@
-name: Test deploy sdist
-
-on:
-  - push
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-
-    steps:
-      - name: Checkout source
-        uses: actions/checkout at v2
-
-      - name: Install Poetry
-        uses: abatilo/actions-poetry at v2.0.0
-
-      - name: Setup test pypi repo
-        run: poetry config repositories.test https://test.pypi.org/legacy/
-
-      - name: Build and publish
-        run: poetry publish --build --repository test -u __token__ -p ${{ secrets.test_pypi_password }}


=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,15 @@
+## Version 0.4.5 (2026/01/13)
+
+
+### Pull Requests Merged
+
+#### Features added
+
+* [PR 38](https://github.com/pytroll/pyninjotiff/pull/38) - Fix package building and error on newer numpy versions
+
+In this release 1 pull request was closed.
+
+
 ## Version 0.4.4 (2025/12/15)
 
 


=====================================
debian/changelog
=====================================
@@ -1,10 +1,14 @@
-pyninjotiff (0.4.4-2) UNRELEASED; urgency=medium
+pyninjotiff (0.4.5-1) unstable; urgency=medium
 
-  * Team upload.
+  [ Bas Couwenberg ]
   * Drop Priority: optional, default since dpkg 1.22.13.
   * Bump Standards-Version to 4.7.3, changes: priority.
 
- -- Bas Couwenberg <sebastic at debian.org>  Sat, 03 Jan 2026 14:12:40 +0100
+  [ Antonio Valentino ]
+  * New upstream release.
+  * Update dates in d/copyright.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 17 Jan 2026 16:11:24 +0000
 
 pyninjotiff (0.4.4-1) unstable; urgency=medium
 


=====================================
debian/copyright
=====================================
@@ -14,7 +14,7 @@ Copyright: 2008-2014, Christoph Gohlke
 License: BSD-3-clause
 
 Files: debian/*
-Copyright: 2018-2025, Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright: 2018-2026, Antonio Valentino <antonio.valentino at tiscali.it>
 License: GPL-3+
 
 License: GPL-3+


=====================================
pyninjotiff/tifffile.py
=====================================
@@ -130,6 +130,8 @@ Examples
 
 from __future__ import division, print_function
 
+from contextlib import suppress
+from functools import partial
 import sys
 import os
 import re
@@ -149,7 +151,7 @@ from xml.etree import cElementTree as etree
 import numpy
 
 try:
-    import _tifffile
+    import _tifffile  # noqa
 except ImportError:
     warnings.warn(
         "failed to import the optional _tifffile C extension module.\n"
@@ -541,7 +543,7 @@ class TiffWriter(object):
             tag_byte_counts = TiffWriter.TAGS['strip_byte_counts']
             tag_offsets = TiffWriter.TAGS['strip_offsets']
 
-        def pack(fmt, *val):
+        def pack(fmt: str, *val):
             return struct.pack(byteorder+fmt, *val)
 
         def addtag(code, dtype, count, value, writeonce=False):
@@ -566,6 +568,9 @@ class TiffWriter(object):
             if count == 1:
                 if isinstance(value, (tuple, list)):
                     value = value[0]
+                with suppress(AttributeError):
+                    # NOTE: For numpy array or xarray DataArray with one element
+                    value = value.item()
                 ifdentry.append(pack(val_format, pack(dtype, value)))
             elif struct.calcsize(dtype) * count <= offset_size:
                 ifdentry.append(pack(val_format,
@@ -620,7 +625,7 @@ class TiffWriter(object):
              'rgb': 2,
              'palette': 3}[photometric])
         if photometric == 'palette':
-            if colormap == None:
+            if colormap is None:
                 raise ValueError(
                     "photometric 'palette' specified but colormap missing")
             else:
@@ -1907,7 +1912,7 @@ class TiffPage(object):
             decompress = TIFF_DECOMPESSORS[self.compression]
             if self.compression == 'jpeg':
                 table = self.jpeg_tables if 'jpeg_tables' in self.tags else b''
-                decompress = lambda x: decodejpg(x, table, self.photometric)
+                decompress = partial(decodejpg)(table=table, photometric=self.photometric)
 
             if self.is_tiled:
                 result = numpy.empty(shape, dtype)
@@ -2561,7 +2566,7 @@ class Record(dict):
                 ("* %s: %s" % (k, str(v))).split("\n", 1)[0]
                 [:PRINT_LINE_LEN].rstrip())
         for k, v in lists:
-            l = []
+            l = []  # noqa
             for i, w in enumerate(v):
                 l.append("* %s[%i]\n  %s" % (k, i,
                                              str(w).replace("\n", "\n  ")))
@@ -3183,7 +3188,7 @@ def imagej_metadata(data, bytecounts, byteorder):
     if not bytecounts:
         raise ValueError("no ImageJ metadata")
 
-    if not data[:4] in (b'IJIJ', b'JIJI'):
+    if data[:4] not in (b'IJIJ', b'JIJI'):
         raise ValueError("invalid ImageJ metadata")
 
     header_size = bytecounts[0]
@@ -3424,7 +3429,7 @@ def unpackints(data, dtype, itemsize, runlen=0):
     dtypestr = '>' + dtype.char  # dtype always big endian?
 
     unpack = struct.unpack
-    l = runlen * (len(data)*8 // (runlen*itemsize + skipbits))
+    l = runlen * (len(data)*8 // (runlen*itemsize + skipbits))  # noqa
     result = numpy.empty((l, ), dtype)
     bitcount = 0
     for i in range(len(result)):
@@ -4538,7 +4543,7 @@ TIFF_TAGS = {
     347: ('jpeg_tables', None, 7, None, None),
     530: ('ycbcr_subsampling', 1, 3, 2, None),
     531: ('ycbcr_positioning', 1, 3, 1, None),
-    32996: ('sgi_matteing', None, None, 1, None),  # use extra_samples
+    32995: ('sgi_matteing', None, None, 1, None),  # use extra_samples
     32996: ('sgi_datatype', None, None, 1, None),  # use sample_format
     32997: ('image_depth', None, 4, 1, None),
     32998: ('tile_depth', None, 4, 1, None),



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyninjotiff/-/compare/393b4f9e55eccf3fa4e14fbfcf73b1b939b0fc67...7aba368b31aad37e0d51f9cf6d3096a5b3d631f7

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyninjotiff/-/compare/393b4f9e55eccf3fa4e14fbfcf73b1b939b0fc67...7aba368b31aad37e0d51f9cf6d3096a5b3d631f7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260117/87070249/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list