[packages/python-imagesize] - updated to 1.3.0 - added py2 patch (fixes python2 tests in presence of python-pathlib package)

qboosh qboosh at pld-linux.org
Sat Mar 5 11:35:33 CET 2022


commit d27ccd19a7063d31c794048a8700715398d4c36c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 5 11:37:28 2022 +0100

    - updated to 1.3.0
    - added py2 patch (fixes python2 tests in presence of python-pathlib package)

 python-imagesize-py2.patch | 16 ++++++++++++++++
 python-imagesize.spec      |  8 +++++---
 2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/python-imagesize.spec b/python-imagesize.spec
index e26a28f..949796b 100644
--- a/python-imagesize.spec
+++ b/python-imagesize.spec
@@ -7,13 +7,14 @@
 Summary:	Python 2 module to get image size from PNG/JPEG/JPEG2000/GIF file
 Summary(pl.UTF-8):	Moduł Pythona 2 do pobierania rozmiaru obrazu z pliku PNG/JPEG/JPEG2000/GIF
 Name:		python-imagesize
-Version:	1.2.0
-Release:	2
+Version:	1.3.0
+Release:	1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/imagesize/
 Source0:	https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-%{version}.tar.gz
-# Source0-md5:	3a1e124594183778a8f87e4bcdb6dca9
+# Source0-md5:	27da6cc27370c69834723012f2eb203a
+Patch0:		%{name}-py2.patch
 URL:		https://pypi.org/project/imagesize/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -53,6 +54,7 @@ rozmiary obrazka.
 
 %prep
 %setup -q -n imagesize-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
diff --git a/python-imagesize-py2.patch b/python-imagesize-py2.patch
new file mode 100644
index 0000000..f4b4059
--- /dev/null
+++ b/python-imagesize-py2.patch
@@ -0,0 +1,16 @@
+--- imagesize-1.3.0/test/test_get.py.orig	2021-11-09 16:07:47.000000000 +0100
++++ imagesize-1.3.0/test/test_get.py	2022-03-05 11:33:25.800031835 +0100
+@@ -1,10 +1,11 @@
+ import unittest
+ import os
++import sys
+ import imagesize
+ 
+-try:
++if sys.version_info[0] >= 3:
+     from pathlib import Path
+-except ImportError:
++else:
+     # Python 2
+     Path = None
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-imagesize.git/commitdiff/d27ccd19a7063d31c794048a8700715398d4c36c



More information about the pld-cvs-commit mailing list