Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-imreg for openSUSE:Factory checked in at 2023-06-01 17:19:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-imreg (Old) and /work/SRC/openSUSE:Factory/.python-imreg.new.2531 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-imreg" Thu Jun 1 17:19:22 2023 rev:4 rq:1090072 version:2022.9.27 Changes: -------- --- /work/SRC/openSUSE:Factory/python-imreg/python-imreg.changes 2021-02-19 23:46:21.815427997 +0100 +++ /work/SRC/openSUSE:Factory/.python-imreg.new.2531/python-imreg.changes 2023-06-01 17:19:29.266148782 +0200 @@ -1,0 +2,6 @@ +Wed May 31 19:23:29 UTC 2023 - Dirk Müller <[email protected]> + +- update to 2022.9.27: + * Fix scipy.ndimage DeprecationWarning + +------------------------------------------------------------------- Old: ---- imreg-2020.1.1.tar.gz New: ---- imreg-2022.9.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-imreg.spec ++++++ --- /var/tmp/diff_new_pack.8wbvXD/_old 2023-06-01 17:19:29.746151627 +0200 +++ /var/tmp/diff_new_pack.8wbvXD/_new 2023-06-01 17:19:29.750151651 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-imreg # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,11 +16,9 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 -%define skip_python36 1 +%{?sle15_python_module_pythons} Name: python-imreg -Version: 2020.1.1 +Version: 2022.9.27 Release: 0 Summary: FFT based image registration License: BSD-3-Clause @@ -29,12 +27,12 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-numpy >= 1.14.5 -Requires: python-scipy >= 1.3 +Requires: python-numpy >= 1.15 +Requires: python-scipy >= 1.5 BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module numpy >= 1.14.5} -BuildRequires: %{python_module scipy >= 1.3} +BuildRequires: %{python_module numpy >= 1.15} +BuildRequires: %{python_module scipy >= 1.5} # /SECTION %python_subpackages ++++++ imreg-2020.1.1.tar.gz -> imreg-2022.9.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/LICENSE new/imreg-2022.9.27/LICENSE --- old/imreg-2020.1.1/LICENSE 2020-01-18 00:34:22.000000000 +0100 +++ new/imreg-2022.9.27/LICENSE 2022-09-27 21:30:34.000000000 +0200 @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2011-2020, Christoph Gohlke +Copyright (c) 2011-2022, 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/imreg-2020.1.1/PKG-INFO new/imreg-2022.9.27/PKG-INFO --- old/imreg-2020.1.1/PKG-INFO 2020-01-18 00:34:23.000000000 +0100 +++ new/imreg-2022.9.27/PKG-INFO 2022-09-27 21:30:36.396435700 +0200 @@ -1,66 +1,13 @@ -Metadata-Version: 1.2 +Metadata-Version: 2.1 Name: imreg -Version: 2020.1.1 +Version: 2022.9.27 Summary: FFT based image registration -Home-page: https://www.lfd.uci.edu/~gohlke/ +Home-page: https://www.cgohlke.com Author: Christoph Gohlke -Author-email: [email protected] +Author-email: [email protected] License: BSD -Description: FFT based image registration - ============================ - - Imreg is a Python library that implements an FFT-based technique for - translation, rotation and scale-invariant image registration [1]. - - :Author: - `Christoph Gohlke <https://www.lfd.uci.edu/~gohlke/>`_ - - :Organization: - Laboratory for Fluorescence Dynamics, University of California, Irvine - - :License: BSD 3-Clause - - :Version: 2020.1.1 - - Requirements - ------------ - * `CPython >= 3.6 <https://www.python.org>`_ - * `Numpy 1.14 <https://www.numpy.org>`_ - * `Scipy 1.3 <https://www.scipy.org>`_ - * `Matplotlib 3.1 <https://www.matplotlib.org>`_ (optional for plotting) - - Notes - ----- - Imreg is no longer being actively developed. - - This implementation is mainly for educational purposes. - - An improved version is being developed at https://github.com/matejak/imreg_dft. - - References - ---------- - 1. An FFT-based technique for translation, rotation and scale-invariant - image registration. BS Reddy, BN Chatterji. - IEEE Transactions on Image Processing, 5, 1266-1271, 1996 - 2. An IDL/ENVI implementation of the FFT-based algorithm for automatic - image registration. H Xiea, N Hicksa, GR Kellera, H Huangb, V Kreinovich. - Computers & Geosciences, 29, 1045-1055, 2003. - 3. Image Registration Using Adaptive Polar Transform. R Matungka, YF Zheng, - RL Ewing. IEEE Transactions on Image Processing, 18(10), 2009. - - Examples - -------- - >>> im0 = imread('t400') - >>> im1 = imread('Tr19s1.3') - >>> im2, scale, angle, (t0, t1) = similarity(im0, im1) - >>> imshow(im0, im1, im2) - - >>> im0 = imread('t350380ori') - >>> im1 = imread('t350380shf') - >>> t0, t1 = translation(im0, im1) - >>> t0, t1 - (20, 50) - +Project-URL: Bug Tracker, https://github.com/cgohlke/imreg/issues +Project-URL: Source Code, https://github.com/cgohlke/imreg Platform: any Classifier: Development Status :: 7 - Inactive Classifier: License :: OSI Approved :: BSD License @@ -68,7 +15,70 @@ Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 -Requires-Python: >=3.6 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.7 +License-File: LICENSE + +FFT based image registration +============================ + +Imreg is a Python library that implements an FFT-based technique for +translation, rotation and scale-invariant image registration [1]. + +:Author: `Christoph Gohlke <https://www.cgohlke.com>`_ +:License: BSD 3-Clause +:Version: 2022.9.27 + +Requirements +------------ + +* `CPython >= 3.7 <https://www.python.org>`_ +* `Numpy 1.15 <https://www.numpy.org>`_ +* `Scipy 1.5 <https://www.scipy.org>`_ +* `Matplotlib 3.3 <https://www.matplotlib.org>`_ (optional for plotting) + +Revisions +--------- + +2022.9.27 + +- Fix scipy.ndimage DeprecationWarning. + +Notes +----- + +Imreg is no longer being actively developed. + +This implementation is mainly for educational purposes. + +An improved version is being developed at https://github.com/matejak/imreg_dft. + +References +---------- + +1. An FFT-based technique for translation, rotation and scale-invariant + image registration. BS Reddy, BN Chatterji. + IEEE Transactions on Image Processing, 5, 1266-1271, 1996 +2. An IDL/ENVI implementation of the FFT-based algorithm for automatic + image registration. H Xiea, N Hicksa, GR Kellera, H Huangb, V Kreinovich. + Computers & Geosciences, 29, 1045-1055, 2003. +3. Image Registration Using Adaptive Polar Transform. R Matungka, YF Zheng, + RL Ewing. IEEE Transactions on Image Processing, 18(10), 2009. + +Examples +-------- + +>>> im0 = imread('t400') +>>> im1 = imread('Tr19s1.3') +>>> im2, scale, angle, (t0, t1) = similarity(im0, im1) +>>> imshow(im0, im1, im2) + +>>> im0 = imread('t350380ori') +>>> im1 = imread('t350380shf') +>>> t0, t1 = translation(im0, im1) +>>> t0, t1 +(20, 50) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/README.rst new/imreg-2022.9.27/README.rst --- old/imreg-2020.1.1/README.rst 2020-01-18 00:34:22.000000000 +0100 +++ new/imreg-2022.9.27/README.rst 2022-09-27 21:30:34.000000000 +0200 @@ -4,25 +4,28 @@ Imreg is a Python library that implements an FFT-based technique for translation, rotation and scale-invariant image registration [1]. -:Author: - `Christoph Gohlke <https://www.lfd.uci.edu/~gohlke/>`_ - -:Organization: - Laboratory for Fluorescence Dynamics, University of California, Irvine - +:Author: `Christoph Gohlke <https://www.cgohlke.com>`_ :License: BSD 3-Clause - -:Version: 2020.1.1 +:Version: 2022.9.27 Requirements ------------ -* `CPython >= 3.6 <https://www.python.org>`_ -* `Numpy 1.14 <https://www.numpy.org>`_ -* `Scipy 1.3 <https://www.scipy.org>`_ -* `Matplotlib 3.1 <https://www.matplotlib.org>`_ (optional for plotting) + +* `CPython >= 3.7 <https://www.python.org>`_ +* `Numpy 1.15 <https://www.numpy.org>`_ +* `Scipy 1.5 <https://www.scipy.org>`_ +* `Matplotlib 3.3 <https://www.matplotlib.org>`_ (optional for plotting) + +Revisions +--------- + +2022.9.27 + +- Fix scipy.ndimage DeprecationWarning. Notes ----- + Imreg is no longer being actively developed. This implementation is mainly for educational purposes. @@ -31,6 +34,7 @@ References ---------- + 1. An FFT-based technique for translation, rotation and scale-invariant image registration. BS Reddy, BN Chatterji. IEEE Transactions on Image Processing, 5, 1266-1271, 1996 @@ -42,6 +46,7 @@ Examples -------- + >>> im0 = imread('t400') >>> im1 = imread('Tr19s1.3') >>> im2, scale, angle, (t0, t1) = similarity(im0, im1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/imreg/imreg.py new/imreg-2022.9.27/imreg/imreg.py --- old/imreg-2020.1.1/imreg/imreg.py 2020-01-18 00:33:53.000000000 +0100 +++ new/imreg-2022.9.27/imreg/imreg.py 2022-09-27 21:28:06.000000000 +0200 @@ -1,6 +1,6 @@ # imreg.py -# Copyright (c) 2011-2020, Christoph Gohlke +# Copyright (c) 2011-2022, Christoph Gohlke # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,25 +34,28 @@ Imreg is a Python library that implements an FFT-based technique for translation, rotation and scale-invariant image registration [1]. -:Author: - `Christoph Gohlke <https://www.lfd.uci.edu/~gohlke/>`_ - -:Organization: - Laboratory for Fluorescence Dynamics, University of California, Irvine - +:Author: `Christoph Gohlke <https://www.cgohlke.com>`_ :License: BSD 3-Clause - -:Version: 2020.1.1 +:Version: 2022.9.27 Requirements ------------ -* `CPython >= 3.6 <https://www.python.org>`_ -* `Numpy 1.14 <https://www.numpy.org>`_ -* `Scipy 1.3 <https://www.scipy.org>`_ -* `Matplotlib 3.1 <https://www.matplotlib.org>`_ (optional for plotting) + +* `CPython >= 3.7 <https://www.python.org>`_ +* `Numpy 1.15 <https://www.numpy.org>`_ +* `Scipy 1.5 <https://www.scipy.org>`_ +* `Matplotlib 3.3 <https://www.matplotlib.org>`_ (optional for plotting) + +Revisions +--------- + +2022.9.27 + +- Fix scipy.ndimage DeprecationWarning. Notes ----- + Imreg is no longer being actively developed. This implementation is mainly for educational purposes. @@ -61,6 +64,7 @@ References ---------- + 1. An FFT-based technique for translation, rotation and scale-invariant image registration. BS Reddy, BN Chatterji. IEEE Transactions on Image Processing, 5, 1266-1271, 1996 @@ -72,6 +76,7 @@ Examples -------- + >>> im0 = imread('t400') >>> im1 = imread('Tr19s1.3') >>> im2, scale, angle, (t0, t1) = similarity(im0, im1) @@ -85,11 +90,16 @@ """ -__version__ = '2020.1.1' +__version__ = '2022.9.27' __all__ = ( - 'translation', 'similarity', 'similarity_matrix', 'logpolar', 'highpass', - 'imread', 'imshow', 'ndii' + 'translation', + 'similarity', + 'similarity_matrix', + 'logpolar', + 'highpass', + 'imread', + 'imshow', ) import math @@ -98,9 +108,9 @@ from numpy.fft import fft2, ifft2, fftshift try: - import scipy.ndimage.interpolation as ndii + import scipy.ndimage as ndimage except ImportError: - import ndimage.interpolation as ndii + import ndimage # type: ignore def translation(im0, im1): @@ -155,13 +165,13 @@ ir = abs(ifft2((f0 * f1.conjugate()) / r0)) i0, i1 = numpy.unravel_index(numpy.argmax(ir), ir.shape) angle = 180.0 * i0 / ir.shape[0] - scale = log_base ** i1 + scale = log_base**i1 if scale > 1.8: ir = abs(ifft2((f1 * f0.conjugate()) / r0)) i0, i1 = numpy.unravel_index(numpy.argmax(ir), ir.shape) angle = -180.0 * i0 / ir.shape[0] - scale = 1.0 / (log_base ** i1) + scale = 1.0 / (log_base**i1) if scale > 1.8: raise ValueError('images are not compatible. Scale change > 1.8') @@ -170,15 +180,15 @@ elif angle > 90.0: angle -= 180.0 - im2 = ndii.zoom(im1, 1.0/scale) - im2 = ndii.rotate(im2, angle) + im2 = ndimage.zoom(im1, 1.0 / scale) + im2 = ndimage.rotate(im2, angle) if im2.shape < im0.shape: t = numpy.zeros_like(im0) - t[:im2.shape[0], :im2.shape[1]] = im2 + t[: im2.shape[0], : im2.shape[1]] = im2 im2 = t elif im2.shape > im0.shape: - im2 = im2[:im0.shape[0], :im0.shape[1]] + im2 = im2[: im0.shape[0], : im0.shape[1]] f0 = fft2(im0) f1 = fft2(im2) @@ -190,15 +200,15 @@ if t1 > f0.shape[1] // 2: t1 -= f0.shape[1] - im2 = ndii.shift(im2, [t0, t1]) + im2 = ndimage.shift(im2, [t0, t1]) # correct parameters for ndimage's internal processing if angle > 0.0: d = int(int(im1.shape[1] / scale) * math.sin(math.radians(angle))) - t0, t1 = t1, d+t0 + t0, t1 = t1, d + t0 elif angle < 0.0: d = int(int(im1.shape[0] / scale) * math.sin(math.radians(angle))) - t0, t1 = d+t1, d+t0 + t0, t1 = d + t1, d + t0 scale = (im1.shape[1] - 1) / (int(im1.shape[1] / scale) - 1) return im2, scale, angle, [-t0, -t1] @@ -239,26 +249,28 @@ d = numpy.hypot(shape[0] - center[0], shape[1] - center[1]) log_base = 10.0 ** (math.log10(d) / (radii)) radius = numpy.empty_like(theta) - radius[:] = numpy.power(log_base, - numpy.arange(radii, dtype='float64')) - 1.0 + radius[:] = ( + numpy.power(log_base, numpy.arange(radii, dtype='float64')) - 1.0 + ) x = radius * numpy.sin(theta) + center[0] y = radius * numpy.cos(theta) + center[1] output = numpy.empty_like(x) - ndii.map_coordinates(image, [x, y], output=output) + ndimage.map_coordinates(image, [x, y], output=output) return output, log_base def highpass(shape): """Return highpass filter to be multiplied with fourier transform.""" x = numpy.outer( - numpy.cos(numpy.linspace(-math.pi/2.0, math.pi/2.0, shape[0])), - numpy.cos(numpy.linspace(-math.pi/2.0, math.pi/2.0, shape[1]))) + numpy.cos(numpy.linspace(-math.pi / 2.0, math.pi / 2.0, shape[0])), + numpy.cos(numpy.linspace(-math.pi / 2.0, math.pi / 2.0, shape[1])), + ) return (1.0 - x) * (2.0 - x) def imread(fname, norm=True): """Return image data from img&hdr uint8 files.""" - with open(fname + '.hdr', 'r') as fh: + with open(fname + '.hdr') as fh: hdr = fh.readlines() img = numpy.fromfile(fname + '.img', numpy.uint8, -1) img.shape = int(hdr[4].split()[-1]), int(hdr[3].split()[-1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/imreg.egg-info/PKG-INFO new/imreg-2022.9.27/imreg.egg-info/PKG-INFO --- old/imreg-2020.1.1/imreg.egg-info/PKG-INFO 2020-01-18 00:34:23.000000000 +0100 +++ new/imreg-2022.9.27/imreg.egg-info/PKG-INFO 2022-09-27 21:30:35.000000000 +0200 @@ -1,66 +1,13 @@ -Metadata-Version: 1.2 +Metadata-Version: 2.1 Name: imreg -Version: 2020.1.1 +Version: 2022.9.27 Summary: FFT based image registration -Home-page: https://www.lfd.uci.edu/~gohlke/ +Home-page: https://www.cgohlke.com Author: Christoph Gohlke -Author-email: [email protected] +Author-email: [email protected] License: BSD -Description: FFT based image registration - ============================ - - Imreg is a Python library that implements an FFT-based technique for - translation, rotation and scale-invariant image registration [1]. - - :Author: - `Christoph Gohlke <https://www.lfd.uci.edu/~gohlke/>`_ - - :Organization: - Laboratory for Fluorescence Dynamics, University of California, Irvine - - :License: BSD 3-Clause - - :Version: 2020.1.1 - - Requirements - ------------ - * `CPython >= 3.6 <https://www.python.org>`_ - * `Numpy 1.14 <https://www.numpy.org>`_ - * `Scipy 1.3 <https://www.scipy.org>`_ - * `Matplotlib 3.1 <https://www.matplotlib.org>`_ (optional for plotting) - - Notes - ----- - Imreg is no longer being actively developed. - - This implementation is mainly for educational purposes. - - An improved version is being developed at https://github.com/matejak/imreg_dft. - - References - ---------- - 1. An FFT-based technique for translation, rotation and scale-invariant - image registration. BS Reddy, BN Chatterji. - IEEE Transactions on Image Processing, 5, 1266-1271, 1996 - 2. An IDL/ENVI implementation of the FFT-based algorithm for automatic - image registration. H Xiea, N Hicksa, GR Kellera, H Huangb, V Kreinovich. - Computers & Geosciences, 29, 1045-1055, 2003. - 3. Image Registration Using Adaptive Polar Transform. R Matungka, YF Zheng, - RL Ewing. IEEE Transactions on Image Processing, 18(10), 2009. - - Examples - -------- - >>> im0 = imread('t400') - >>> im1 = imread('Tr19s1.3') - >>> im2, scale, angle, (t0, t1) = similarity(im0, im1) - >>> imshow(im0, im1, im2) - - >>> im0 = imread('t350380ori') - >>> im1 = imread('t350380shf') - >>> t0, t1 = translation(im0, im1) - >>> t0, t1 - (20, 50) - +Project-URL: Bug Tracker, https://github.com/cgohlke/imreg/issues +Project-URL: Source Code, https://github.com/cgohlke/imreg Platform: any Classifier: Development Status :: 7 - Inactive Classifier: License :: OSI Approved :: BSD License @@ -68,7 +15,70 @@ Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 -Requires-Python: >=3.6 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.7 +License-File: LICENSE + +FFT based image registration +============================ + +Imreg is a Python library that implements an FFT-based technique for +translation, rotation and scale-invariant image registration [1]. + +:Author: `Christoph Gohlke <https://www.cgohlke.com>`_ +:License: BSD 3-Clause +:Version: 2022.9.27 + +Requirements +------------ + +* `CPython >= 3.7 <https://www.python.org>`_ +* `Numpy 1.15 <https://www.numpy.org>`_ +* `Scipy 1.5 <https://www.scipy.org>`_ +* `Matplotlib 3.3 <https://www.matplotlib.org>`_ (optional for plotting) + +Revisions +--------- + +2022.9.27 + +- Fix scipy.ndimage DeprecationWarning. + +Notes +----- + +Imreg is no longer being actively developed. + +This implementation is mainly for educational purposes. + +An improved version is being developed at https://github.com/matejak/imreg_dft. + +References +---------- + +1. An FFT-based technique for translation, rotation and scale-invariant + image registration. BS Reddy, BN Chatterji. + IEEE Transactions on Image Processing, 5, 1266-1271, 1996 +2. An IDL/ENVI implementation of the FFT-based algorithm for automatic + image registration. H Xiea, N Hicksa, GR Kellera, H Huangb, V Kreinovich. + Computers & Geosciences, 29, 1045-1055, 2003. +3. Image Registration Using Adaptive Polar Transform. R Matungka, YF Zheng, + RL Ewing. IEEE Transactions on Image Processing, 18(10), 2009. + +Examples +-------- + +>>> im0 = imread('t400') +>>> im1 = imread('Tr19s1.3') +>>> im2, scale, angle, (t0, t1) = similarity(im0, im1) +>>> imshow(im0, im1, im2) + +>>> im0 = imread('t350380ori') +>>> im1 = imread('t350380shf') +>>> t0, t1 = translation(im0, im1) +>>> t0, t1 +(20, 50) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/imreg.egg-info/requires.txt new/imreg-2022.9.27/imreg.egg-info/requires.txt --- old/imreg-2020.1.1/imreg.egg-info/requires.txt 2020-01-18 00:34:23.000000000 +0100 +++ new/imreg-2022.9.27/imreg.egg-info/requires.txt 2022-09-27 21:30:35.000000000 +0200 @@ -1,2 +1,2 @@ -numpy>=1.14.5 -scipy>=1.2 +numpy>=1.15.1 +scipy>=1.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/imreg-2020.1.1/setup.py new/imreg-2022.9.27/setup.py --- old/imreg-2020.1.1/setup.py 2020-01-17 21:27:36.000000000 +0100 +++ new/imreg-2022.9.27/setup.py 2022-09-27 21:20:28.000000000 +0200 @@ -1,27 +1,43 @@ # imreg/setup.py -"""imreg package setuptools script.""" +"""Imreg package Setuptools script.""" import sys import re from setuptools import setup + +def search(pattern, code, flags=0): + # return first match for pattern in code + match = re.search(pattern, code, flags) + if match is None: + raise ValueError(f'{pattern!r} not found') + return match.groups()[0] + + with open('imreg/imreg.py') as fh: code = fh.read() -version = re.search(r"__version__ = '(.*?)'", code).groups()[0] +version = search(r"__version__ = '(.*?)'", code) -description = re.search(r'"""(.*)\.(?:\r\n|\r|\n)', code).groups()[0] +description = search(r'"""(.*)\.(?:\r\n|\r|\n)', code) -readme = re.search(r'(?:\r\n|\r|\n){2}"""(.*)"""(?:\r\n|\r|\n){2}__version__', - code, re.MULTILINE | re.DOTALL).groups()[0] +readme = search( + r'(?:\r\n|\r|\n){2}"""(.*)"""(?:\r\n|\r|\n){2}[__version__|from]', + code, + re.MULTILINE | re.DOTALL, +) -readme = '\n'.join([description, '=' * len(description)] + - readme.splitlines()[1:]) +readme = '\n'.join( + [description, '=' * len(description)] + readme.splitlines()[1:] +) -license = re.search(r'(# Copyright.*?(?:\r\n|\r|\n))(?:\r\n|\r|\n)+""', code, - re.MULTILINE | re.DOTALL).groups()[0] +license = search( + r'(# Copyright.*?(?:\r\n|\r|\n))(?:\r\n|\r|\n)+""', + code, + re.MULTILINE | re.DOTALL, +) license = license.replace('# ', '').replace('#', '') @@ -35,15 +51,20 @@ setup( name='imreg', version=version, + license='BSD', description=description, long_description=readme, author='Christoph Gohlke', - author_email='[email protected]', - url='https://www.lfd.uci.edu/~gohlke/', + author_email='[email protected]', + url='https://www.cgohlke.com', + project_urls={ + 'Bug Tracker': 'https://github.com/cgohlke/imreg/issues', + 'Source Code': 'https://github.com/cgohlke/imreg', + # 'Documentation': 'https://', + }, packages=['imreg'], - python_requires='>=3.6', - install_requires=['numpy>=1.14.5', 'scipy>=1.2'], - license='BSD', + python_requires='>=3.7', + install_requires=['numpy>=1.15.1', 'scipy>=1.4'], platforms=['any'], classifiers=[ 'Development Status :: 7 - Inactive', @@ -52,8 +73,10 @@ 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], )
