Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cmapfile for openSUSE:Factory 
checked in at 2023-09-04 22:54:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cmapfile (Old)
 and      /work/SRC/openSUSE:Factory/.python-cmapfile.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cmapfile"

Mon Sep  4 22:54:06 2023 rev:4 rq:1108928 version:2023.8.30

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cmapfile/python-cmapfile.changes  
2023-01-28 19:00:56.763929500 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-cmapfile.new.1766/python-cmapfile.changes    
    2023-09-04 22:55:05.814980017 +0200
@@ -1,0 +2,6 @@
+Mon Sep  4 16:02:53 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2023.8.30:
+  * Drop support for Python 3.8 and numpy < 1.22 (NEP29). 
+
+-------------------------------------------------------------------

Old:
----
  cmapfile-2022.9.29.tar.gz

New:
----
  cmapfile-2023.8.30.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cmapfile.spec ++++++
--- /var/tmp/diff_new_pack.t78VUe/_old  2023-09-04 22:55:06.759013388 +0200
+++ /var/tmp/diff_new_pack.t78VUe/_new  2023-09-04 22:55:06.763013529 +0200
@@ -17,17 +17,17 @@
 
 
 Name:           python-cmapfile
-Version:        2022.9.29
+Version:        2023.8.30
 Release:        0
 Summary:        Write Chimera Map (CMAP) files
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-URL:            https://www.lfd.uci.edu/~gohlke/
+URL:            https://github.com/cgohlke/cmapfile/
 # SourceRepository: https://github.com/cgohlke/cmapfile
 Source:         
https://github.com/cgohlke/cmapfile/archive/v%{version}.tar.gz#/cmapfile-%{version}.tar.gz
-BuildRequires:  %{python_module base >= 3.8}
+BuildRequires:  %{python_module base >= 3.9}
 BuildRequires:  %{python_module h5py >= 3.1}
-BuildRequires:  %{python_module numpy >= 1.19.2}
+BuildRequires:  %{python_module numpy >= 1.22}
 BuildRequires:  %{python_module oiffile >= 2021.6.6}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module scipy >= 1.5}
@@ -37,7 +37,7 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-h5py >= 3.1
-Requires:       python-numpy >= 1.19.2
+Requires:       python-numpy >= 1.22
 Requires:       python-oiffile >= 2021.6.6
 Requires:       python-scipy >= 1.5
 Requires:       python-tifffile >= 2021.11.2

++++++ cmapfile-2022.9.29.tar.gz -> cmapfile-2023.8.30.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmapfile-2022.9.29/LICENSE 
new/cmapfile-2023.8.30/LICENSE
--- old/cmapfile-2022.9.29/LICENSE      2022-09-30 06:20:32.000000000 +0200
+++ new/cmapfile-2023.8.30/LICENSE      2023-08-31 02:22:55.000000000 +0200
@@ -1,6 +1,6 @@
 BSD 3-Clause License
 
-Copyright (c) 2014-2022, Christoph Gohlke
+Copyright (c) 2014-2023, Christoph Gohlke
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmapfile-2022.9.29/MANIFEST.in 
new/cmapfile-2023.8.30/MANIFEST.in
--- old/cmapfile-2022.9.29/MANIFEST.in  2022-09-30 06:20:32.000000000 +0200
+++ new/cmapfile-2023.8.30/MANIFEST.in  2023-08-31 02:22:55.000000000 +0200
@@ -2,6 +2,14 @@
 include README.rst
 include test.oib
 
+include cmapfile/py.typed
+
+exclude *.cmd
+recursive-exclude doc *
+recursive-exclude docs *
+recursive-exclude test *
+recursive-exclude tests *
+
 recursive-exclude * __pycache__
 recursive-exclude * *.py[co]
 recursive-exclude * *Copy*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmapfile-2022.9.29/README.rst 
new/cmapfile-2023.8.30/README.rst
--- old/cmapfile-2022.9.29/README.rst   2022-09-30 06:20:32.000000000 +0200
+++ new/cmapfile-2023.8.30/README.rst   2023-08-31 02:22:55.000000000 +0200
@@ -12,52 +12,74 @@
 
 :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
 :License: BSD 3-Clause
-:Version: 2022.9.29
+:Version: 2023.8.30
+
+Quickstart
+----------
+
+Install the cmapfile package and all dependencies from the
+`Python Package Index <https://pypi.org/project/cmapfile/>`_::
+
+    python -m pip install -U cmapfile[all]
+
+Print the command line usage::
+
+    python -m cmapfile --help
+
+See `Examples`_ for usage cases.
+
+Source code and support are available on
+`GitHub <https://github.com/cgohlke/cmapfile>`_.
 
 Requirements
 ------------
 
-This release has been tested with the following requirements and dependencies
+This revision was tested with the following requirements and dependencies
 (other versions may work):
 
-- `CPython 3.8.10, 3.9.13, 3.10.7, 3.11.0rc2 <https://www.python.org>`_
-  (32-bit platforms are deprecated)
-- `Numpy 1.21.5 <https://pypi.org/project/numpy/>`_
-- `Scipy 1.8.1 <https://pypi.org/project/scipy/>`_
-- `H5py 3.7.0 <https://pypi.org/project/h5py/>`_
-- `Tifffile 2022.8.12 <https://pypi.org/project/tifffile/>`_  (optional)
-- `Oiffile 2022.2.2 <https://pypi.org/project/oiffile />`_ (optional)
+- `CPython <https://www.python.org>`_ 3.9.13, 3.10.11, 3.11.5, 3.12rc
+- `NumPy <https://pypi.org/project/numpy/>`_ 1.25.2
+- `Scipy <https://pypi.org/project/scipy/>`_ 1.11.2
+- `H5py <https://pypi.org/project/h5py/>`_ 3.9.0
+- `Tifffile <https://pypi.org/project/tifffile/>`_ 2023.8.30 (optional)
+- `Oiffile <https://pypi.org/project/oiffile/>`_ 2023.8.30 (optional)
 
-References
-----------
+Revisions
+---------
 
-1. Thomas Goddard. [Chimera-users] reading in hdf5 files in chimera.
-   https://www.cgl.ucsf.edu/pipermail/chimera-users/2008-September/003052.html
-2. UCSF Chimera, an extensible molecular modeling system.
-   https://www.cgl.ucsf.edu/chimera/
-3. Globals for Images - SimFCS. https://www.lfd.uci.edu/globals/
+2023.8.30
 
-Examples
---------
+- Drop support for Python 3.8 and numpy < 1.22 (NEP29).
 
-Print the command line usage::
+2022.9.29
 
-    python -m cmapfile --help
+- Make subsampling compatible with ChimeraX (breaking).
+- Fix deprecated import of scipy.ndimage.interpolation.zoom.
+- Switch to Google style docstrings.
 
-Convert a 5D LSM file to CMAP file::
+2022.2.2
 
-    python -m cmapfile "/my data directory/large.lsm"
+- Add type hints.
+- Drop support for Python 3.7 and numpy < 1.19 (NEP29).
 
-Convert all BIN files in the current directory to test.cmap. The BIN files
-are known to contain 128x128x64 samples of 16-bit integers. The CMAP file
-will store float32 maps using subsampling up to 16::
+2021.2.26
+
+- Fix LSM conversion with tifffile >= 2021.2.26.
+- Remove support for Python 3.6 (NEP 29).
 
-    python -m cmapfile --shape 128,128,64 --step 1,1,2 --dtype i2
-                       --cmap test.cmap --subsample 16 --astype float32 *.bin
+2020.1.1
 
-Change the step size in the CMAP file::
+- Do not write name attribute.
+- Remove support for Python 2.7 and 3.5.
+- Update copyright.
+
+2018.8.30
 
-    python -m cmapfile --step 1,1,1.5 test.cmap
+- Move cmapfile.py into cmapfile package.
+
+2014.10.10
+
+- Initial release.
 
 Notes
 -----
@@ -84,35 +106,51 @@
         subsample_spacing (2, 2, 2) (attribute)
      (more subsampled or alternate chunkshape versions of same data)
 
-Revisions
----------
+References
+----------
 
-2022.9.29
+1. Thomas Goddard. [Chimera-users] reading in hdf5 files in chimera.
+   https://www.cgl.ucsf.edu/pipermail/chimera-users/2008-September/003052.html
+2. UCSF Chimera, an extensible molecular modeling system.
+   https://www.cgl.ucsf.edu/chimera/
+3. Globals for Images - SimFCS. https://www.lfd.uci.edu/globals/
 
-- Make subsampling compatible with ChimeraX (breaking).
-- Fix deprecated import of scipy.ndimage.interpolation.zoom.
-- Switch to Google style docstrings.
+Examples
+--------
 
-2022.2.2
+Convert a 5D LSM file to CMAP file::
 
-- Add type hints.
-- Drop support for Python 3.7 and numpy < 1.19 (NEP29).
+    $ python -m cmapfile "/my data directory/large.lsm"
 
-2021.2.26
+Convert all BIN files in the current directory to test.cmap. The BIN files
+are known to contain 128x128x64 samples of 16-bit integers. The CMAP file
+will store float32 maps using subsampling up to 16::
 
-- Fix LSM conversion with tifffile >= 2021.2.26.
-- Remove support for Python 3.6 (NEP 29).
+    $ python -m cmapfile --shape 128,128,64 --step 1,1,2 --dtype i2 \
+                         --cmap test.cmap --subsample 16 --astype float32 *.bin
 
-2020.1.1
+Change the step size in the CMAP file::
 
-- Do not write name attribute.
-- Remove support for Python 2.7 and 3.5.
-- Update copyright.
+    $ python -m cmapfile --step 1,1,1.5 test.cmap
 
-2018.8.30
+Print the cmapfile script usage::
 
-- Move cmapfile.py into cmapfile package.
+    $ python -m cmapfile --help
 
-2014.10.10
+    Usage: cmapfile [options] files
 
-- Initial release.
+    Convert volume data files to Chimera MAP files.
+
+    Options:
+    --version             show program's version number and exit
+    -h, --help            show this help message and exit
+    -q, --quiet
+    --filetype=FILETYPE   type of input file(s), e.g. BIN, LSM, OIF, TIF
+    --dtype=DTYPE         type of data in BIN files. e.g. uint16
+    --shape=SHAPE         shape of data in BIN files in F order, e.g 256,256,32
+    --offset=OFFSET       number of bytes to skip at beginning of BIN files
+    --step=STEP           stepsize of data in files in F order, e.g 1.0,1.0,8.0
+    --cmap=CMAP           name of output CMAP file
+    --astype=ASTYPE       type of data in CMAP file. e.g. float32
+    --subsample=SUBSAMPLE
+                            write subsampled datasets to CMAP file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmapfile-2022.9.29/cmapfile/cmapfile.py 
new/cmapfile-2023.8.30/cmapfile/cmapfile.py
--- old/cmapfile-2022.9.29/cmapfile/cmapfile.py 2022-09-30 06:20:32.000000000 
+0200
+++ new/cmapfile-2023.8.30/cmapfile/cmapfile.py 2023-08-31 02:22:55.000000000 
+0200
@@ -1,6 +1,6 @@
 # cmapfile.py
 
-# Copyright (c) 2014-2022, Christoph Gohlke
+# Copyright (c) 2014-2023, Christoph Gohlke
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -42,52 +42,74 @@
 
 :Author: `Christoph Gohlke <https://www.cgohlke.com>`_
 :License: BSD 3-Clause
-:Version: 2022.9.29
+:Version: 2023.8.30
+
+Quickstart
+----------
+
+Install the cmapfile package and all dependencies from the
+`Python Package Index <https://pypi.org/project/cmapfile/>`_::
+
+    python -m pip install -U cmapfile[all]
+
+Print the command line usage::
+
+    python -m cmapfile --help
+
+See `Examples`_ for usage cases.
+
+Source code and support are available on
+`GitHub <https://github.com/cgohlke/cmapfile>`_.
 
 Requirements
 ------------
 
-This release has been tested with the following requirements and dependencies
+This revision was tested with the following requirements and dependencies
 (other versions may work):
 
-- `CPython 3.8.10, 3.9.13, 3.10.7, 3.11.0rc2 <https://www.python.org>`_
-  (32-bit platforms are deprecated)
-- `Numpy 1.21.5 <https://pypi.org/project/numpy/>`_
-- `Scipy 1.8.1 <https://pypi.org/project/scipy/>`_
-- `H5py 3.7.0 <https://pypi.org/project/h5py/>`_
-- `Tifffile 2022.8.12 <https://pypi.org/project/tifffile/>`_  (optional)
-- `Oiffile 2022.2.2 <https://pypi.org/project/oiffile />`_ (optional)
+- `CPython <https://www.python.org>`_ 3.9.13, 3.10.11, 3.11.5, 3.12rc
+- `NumPy <https://pypi.org/project/numpy/>`_ 1.25.2
+- `Scipy <https://pypi.org/project/scipy/>`_ 1.11.2
+- `H5py <https://pypi.org/project/h5py/>`_ 3.9.0
+- `Tifffile <https://pypi.org/project/tifffile/>`_ 2023.8.30 (optional)
+- `Oiffile <https://pypi.org/project/oiffile/>`_ 2023.8.30 (optional)
 
-References
-----------
+Revisions
+---------
 
-1. Thomas Goddard. [Chimera-users] reading in hdf5 files in chimera.
-   https://www.cgl.ucsf.edu/pipermail/chimera-users/2008-September/003052.html
-2. UCSF Chimera, an extensible molecular modeling system.
-   https://www.cgl.ucsf.edu/chimera/
-3. Globals for Images - SimFCS. https://www.lfd.uci.edu/globals/
+2023.8.30
 
-Examples
---------
+- Drop support for Python 3.8 and numpy < 1.22 (NEP29).
 
-Print the command line usage::
+2022.9.29
 
-    python -m cmapfile --help
+- Make subsampling compatible with ChimeraX (breaking).
+- Fix deprecated import of scipy.ndimage.interpolation.zoom.
+- Switch to Google style docstrings.
 
-Convert a 5D LSM file to CMAP file::
+2022.2.2
 
-    python -m cmapfile "/my data directory/large.lsm"
+- Add type hints.
+- Drop support for Python 3.7 and numpy < 1.19 (NEP29).
 
-Convert all BIN files in the current directory to test.cmap. The BIN files
-are known to contain 128x128x64 samples of 16-bit integers. The CMAP file
-will store float32 maps using subsampling up to 16::
+2021.2.26
 
-    python -m cmapfile --shape 128,128,64 --step 1,1,2 --dtype i2
-                       --cmap test.cmap --subsample 16 --astype float32 *.bin
+- Fix LSM conversion with tifffile >= 2021.2.26.
+- Remove support for Python 3.6 (NEP 29).
 
-Change the step size in the CMAP file::
+2020.1.1
 
-    python -m cmapfile --step 1,1,1.5 test.cmap
+- Do not write name attribute.
+- Remove support for Python 2.7 and 3.5.
+- Update copyright.
+
+2018.8.30
+
+- Move cmapfile.py into cmapfile package.
+
+2014.10.10
+
+- Initial release.
 
 Notes
 -----
@@ -114,44 +136,60 @@
         subsample_spacing (2, 2, 2) (attribute)
      (more subsampled or alternate chunkshape versions of same data)
 
-Revisions
----------
+References
+----------
 
-2022.9.29
+1. Thomas Goddard. [Chimera-users] reading in hdf5 files in chimera.
+   https://www.cgl.ucsf.edu/pipermail/chimera-users/2008-September/003052.html
+2. UCSF Chimera, an extensible molecular modeling system.
+   https://www.cgl.ucsf.edu/chimera/
+3. Globals for Images - SimFCS. https://www.lfd.uci.edu/globals/
 
-- Make subsampling compatible with ChimeraX (breaking).
-- Fix deprecated import of scipy.ndimage.interpolation.zoom.
-- Switch to Google style docstrings.
+Examples
+--------
 
-2022.2.2
+Convert a 5D LSM file to CMAP file::
 
-- Add type hints.
-- Drop support for Python 3.7 and numpy < 1.19 (NEP29).
+    $ python -m cmapfile "/my data directory/large.lsm"
 
-2021.2.26
+Convert all BIN files in the current directory to test.cmap. The BIN files
+are known to contain 128x128x64 samples of 16-bit integers. The CMAP file
+will store float32 maps using subsampling up to 16::
 
-- Fix LSM conversion with tifffile >= 2021.2.26.
-- Remove support for Python 3.6 (NEP 29).
+    $ python -m cmapfile --shape 128,128,64 --step 1,1,2 --dtype i2 \
+                         --cmap test.cmap --subsample 16 --astype float32 *.bin
 
-2020.1.1
+Change the step size in the CMAP file::
 
-- Do not write name attribute.
-- Remove support for Python 2.7 and 3.5.
-- Update copyright.
+    $ python -m cmapfile --step 1,1,1.5 test.cmap
 
-2018.8.30
+Print the cmapfile script usage::
 
-- Move cmapfile.py into cmapfile package.
+    $ python -m cmapfile --help
 
-2014.10.10
+    Usage: cmapfile [options] files
 
-- Initial release.
+    Convert volume data files to Chimera MAP files.
+
+    Options:
+    --version             show program's version number and exit
+    -h, --help            show this help message and exit
+    -q, --quiet
+    --filetype=FILETYPE   type of input file(s), e.g. BIN, LSM, OIF, TIF
+    --dtype=DTYPE         type of data in BIN files. e.g. uint16
+    --shape=SHAPE         shape of data in BIN files in F order, e.g 256,256,32
+    --offset=OFFSET       number of bytes to skip at beginning of BIN files
+    --step=STEP           stepsize of data in files in F order, e.g 1.0,1.0,8.0
+    --cmap=CMAP           name of output CMAP file
+    --astype=ASTYPE       type of data in CMAP file. e.g. float32
+    --subsample=SUBSAMPLE
+                            write subsampled datasets to CMAP file
 
 """
 
 from __future__ import annotations
 
-__version__ = '2022.9.29'
+__version__ = '2023.8.30'
 
 __all__ = [
     'CmapFile',
@@ -162,34 +200,29 @@
     'array2cmap',
 ]
 
-import sys
-import os
 import glob
+import os
+import sys
 import warnings
 
-import numpy
 import h5py
+import numpy
 
 try:
     from scipy.ndimage import zoom
 except ImportError:
     from ndimage import zoom
 
-from tifffile import TiffFile, transpose_axes, natural_sorted, product
-from oiffile import OifFile
-
 from typing import TYPE_CHECKING
 
-if TYPE_CHECKING:
-    from typing import Any, Union, Sequence, Iterator
+from oiffile import OifFile
+from tifffile import TiffFile, natural_sorted, product, transpose_axes
 
-    try:
-        from numpy.typing import ArrayLike
-    except ImportError:
-        # numpy < 1.20
-        from numpy import ndarray as ArrayLike
+if TYPE_CHECKING:
+    from collections.abc import Iterator, Sequence
+    from typing import Any
 
-    PathLike = Union[str, os.PathLike]
+    from numpy.typing import ArrayLike, DTypeLike
 
 
 class CmapFile(h5py.File):
@@ -208,7 +241,7 @@
     mapcounter: int
 
     def __init__(
-        self, filename: PathLike, /, mode: str = 'w', **kwargs
+        self, filename: str | os.PathLike[Any], /, mode: str = 'w', **kwargs
     ) -> None:
         h5py.File.__init__(self, name=filename, mode=mode, **kwargs)
         self.mapcounter = 0
@@ -228,7 +261,7 @@
         time: int | None = None,
         channel: int | None = None,
         symmetries=None,
-        astype: numpy.dtype = None,
+        astype: DTypeLike | None = None,
         subsample: int = 16,
         chunks: bool = True,
         compression: str | None = None,
@@ -323,13 +356,13 @@
             compression=compression,
         )
         # create subsampled datasets
-        for i, data in enumerate(subsamples(data, int(subsample))):
+        for i, subsampled in enumerate(subsamples(data, int(subsample))):
             sample = 2 ** (i + 1)
             if verbose:
                 print(f'{sample} ', end='', flush=True)
             dset = group.create_dataset(
                 f'data{self.mapcounter:05d}_{i + 2}',
-                data=data,
+                data=subsampled,
                 chunks=chunks,
                 compression=compression,
             )
@@ -349,12 +382,12 @@
 
 
 def bin2cmap(
-    binfiles: Sequence[PathLike] | str,
+    binfiles: Sequence[str | os.PathLike[Any]] | str,
     /,
     shape: tuple[int, ...],
     dtype: numpy.dtype,
     offset: int = 0,
-    cmapfile: PathLike | None = None,
+    cmapfile: str | os.PathLike[Any] | None = None,
     fail: bool = True,
     **kwargs,
 ) -> None:
@@ -418,9 +451,9 @@
 
 
 def tif2cmap(
-    tiffiles: Sequence[PathLike],
+    tiffiles: Sequence[str | os.PathLike[Any]],
     /,
-    cmapfile: PathLike | None = None,
+    cmapfile: str | os.PathLike[Any] | None = None,
     fail: bool = True,
     **kwargs,
 ) -> None:
@@ -473,7 +506,10 @@
 
 
 def lsm2cmap(
-    lsmfile: PathLike, /, cmapfile: PathLike | None = None, **kwargs
+    lsmfile: str | os.PathLike[Any],
+    /,
+    cmapfile: str | os.PathLike[Any] | None = None,
+    **kwargs,
 ) -> None:
     """Convert 5D TZCYX LSM file to Chimera MAP files, one per channel.
 
@@ -544,7 +580,11 @@
 
 
 def array2cmap(
-    data: numpy.ndarray, /, axes: str, cmapfile: PathLike, **kwargs
+    data: numpy.ndarray,
+    /,
+    axes: str,
+    cmapfile: str | os.PathLike[Any],
+    **kwargs,
 ) -> None:
     """Save numpy ndarray to Chimera MAP files, one per channel.
 
@@ -586,7 +626,10 @@
 
 
 def oif2cmap(
-    oiffile: PathLike, /, cmapfile: PathLike = None, **kwargs
+    oiffile: str | os.PathLike[Any],
+    /,
+    cmapfile: str | os.PathLike[Any] | None = None,
+    **kwargs,
 ) -> None:
     """Convert OIF or OIB files to Chimera MAP files, one per channel.
 
@@ -718,7 +761,9 @@
         raise ValueError(f"not a '{sep}' separated list of numbers") from exc
 
 
-def parse_files(files: Sequence[PathLike], /) -> Sequence[PathLike]:
+def parse_files(
+    files: Sequence[str | os.PathLike[Any]], /
+) -> Sequence[str | os.PathLike[Any]]:
     """Return list of file names from pattern or list of file names.
 
     Parameters:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmapfile-2022.9.29/setup.py 
new/cmapfile-2023.8.30/setup.py
--- old/cmapfile-2022.9.29/setup.py     2022-09-30 06:20:32.000000000 +0200
+++ new/cmapfile-2023.8.30/setup.py     2023-08-31 02:22:55.000000000 +0200
@@ -1,9 +1,9 @@
 # cmapfile/setup.py
 
-"""Cmapfile package setuptools script."""
+"""Cmapfile package Setuptools script."""
 
-import sys
 import re
+import sys
 
 from setuptools import setup
 
@@ -16,15 +16,15 @@
     return match.groups()[0]
 
 
-with open('cmapfile/cmapfile.py') as fh:
+with open('cmapfile/cmapfile.py', encoding='utf-8') as fh:
     code = fh.read()
 
-version = search(r"__version__ = '(.*?)'", code)
+version = search(r"__version__ = '(.*?)'", code).replace('.x.x', '.dev')
 
 description = search(r'"""(.*)\.(?:\r\n|\r|\n)', code)
 
 readme = search(
-    r'(?:\r\n|\r|\n){2}"""(.*)"""(?:\r\n|\r|\n){2}[__version__|from]',
+    r'(?:\r\n|\r|\n){2}"""(.*)"""(?:\r\n|\r|\n){2}from __future__',
     code,
     re.MULTILINE | re.DOTALL,
 )
@@ -42,10 +42,10 @@
 license = license.replace('# ', '').replace('#', '')
 
 if 'sdist' in sys.argv:
-    with open('LICENSE', 'w') as fh:
+    with open('LICENSE', 'w', encoding='utf-8') as fh:
         fh.write('BSD 3-Clause License\n\n')
         fh.write(license)
-    with open('README.rst', 'w') as fh:
+    with open('README.rst', 'w', encoding='utf-8') as fh:
         fh.write(readme)
 
 setup(
@@ -54,6 +54,7 @@
     license='BSD',
     description=description,
     long_description=readme,
+    long_description_content_type='text/x-rst',
     author='Christoph Gohlke',
     author_email='cgoh...@cgohlke.com',
     url='https://www.cgohlke.com',
@@ -63,14 +64,16 @@
         # 'Documentation': 'https://',
     },
     packages=['cmapfile'],
-    python_requires='>=3.8',
+    package_data={'cmapfile': ['py.typed']},
+    python_requires='>=3.9',
     install_requires=[
-        'numpy>=1.19.2',
-        'scipy>=1.5',
-        'h5py>=3.1',
-        'tifffile>=2021.11.2',
-        'oiffile>=2021.6.6',
+        'numpy',
+        'scipy',
+        'h5py',
+        'tifffile',
+        'oiffile',
     ],
+    extras_require={'all': ['imagecodecs']},
     entry_points={'console_scripts': ['cmapfile = cmapfile:main']},
     platforms=['any'],
     classifiers=[
@@ -80,9 +83,9 @@
         'Intended Audience :: Developers',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 3 :: Only',
-        'Programming Language :: Python :: 3.8',
         'Programming Language :: Python :: 3.9',
         'Programming Language :: Python :: 3.10',
         'Programming Language :: Python :: 3.11',
+        'Programming Language :: Python :: 3.12',
     ],
 )

Reply via email to