diff --git a/0001-Added-return-types-to-docstrings-and-fixed-descripti.patch b/0001-Added-return-types-to-docstrings-and-fixed-descripti.patch new file mode 100644 index 0000000..14bba5e --- /dev/null +++ b/0001-Added-return-types-to-docstrings-and-fixed-descripti.patch @@ -0,0 +1,36 @@ +From 2f73f20f73cfe097d6838b45eee22cb300d9cc04 Mon Sep 17 00:00:00 2001 +From: Tyler Young +Date: Tue, 27 Aug 2019 12:43:35 -0500 +Subject: [PATCH] Added return types to docstrings, and fixed description of + getDPI()'s return + +--- + imagesize.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/imagesize.py b/imagesize.py +index 2717240..b0fbfb2 100644 +--- a/imagesize.py ++++ b/imagesize.py +@@ -56,6 +56,7 @@ def get(filepath): + """ + Return (width, height) for a given img file content + no requirements ++ :rtype Tuple[int, int] + """ + height = -1 + width = -1 +@@ -153,8 +154,9 @@ def get(filepath): + + def getDPI(filepath): + """ +- Return (width, height) for a given img file content ++ Return (x DPI, y DPI) for a given img file content + no requirements ++ :rtype Tuple[int, int] + """ + xDPI = -1 + yDPI = -1 +-- +2.39.0.windows.2 + diff --git a/python-imagesize.spec b/python-imagesize.spec index 4d558b2..f8aa62b 100644 --- a/python-imagesize.spec +++ b/python-imagesize.spec @@ -1,10 +1,11 @@ Name: python-imagesize Version: 1.1.0 -Release: 1 +Release: 2 Summary: This module analyzes image headers and returns image size. License: MIT URL: https://github.com/shibukawa/imagesize_py Source0: https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-%{version}.tar.gz +Patch01: 0001-Added-return-types-to-docstrings-and-fixed-descripti.patch BuildArch: noarch BuildRequires: python2-setuptools python2-devel python2-pytest python3-setuptools BuildRequires: python3-devel python3-pytest @@ -27,7 +28,7 @@ Summary: This module analyzes image headers and returns image size. This module analyzes JPEG/JPEG 2000/PNG/GIF/TIFF image headers and returns image size. %prep -%autosetup -n imagesize-%{version} +%autosetup -n imagesize-%{version} -p1 rm -rf imagesize.egg-info %build %py2_build @@ -48,6 +49,10 @@ py.test-3 %{python3_sitelib}/* %changelog + +* Thu Oct 19 2023 zhangliangpengkun - 1.1.0-2 +- Added return types to docstrings, and fixed description of getDPI()'s… + * Tue Aug 04 2020 Yeqing Peng - 1.1.0-1 - update to 1.1.0