[packages/python-pysane] - switched to pillow

qboosh qboosh at pld-linux.org
Sat Mar 7 15:52:21 CET 2020


commit 593b46568043b8bbfd773e6733f7e34500c0e249
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 7 15:53:15 2020 +0100

    - switched to pillow

 python-pysane.spec | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/python-pysane.spec b/python-pysane.spec
index 8b8793c..a57a9ca 100644
--- a/python-pysane.spec
+++ b/python-pysane.spec
@@ -5,17 +5,19 @@ Version:	2.0.1
 Release:	2
 License:	MIT-like
 Group:		Libraries/Python
-Source0:	https://pypi.python.org/packages/source/p/pysane/pysane-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/pysane/
+Source0:	https://files.pythonhosted.org/packages/source/p/pysane/pysane-%{version}.tar.gz
 # Source0-md5:	8964574c06ab6ee7b782429386e887ac
-URL:		https://pypi.python.org/pypi/pysane/
-BuildRequires:	python-PIL-devel
-BuildRequires:	python-devel >= 2
+URL:		https://pypi.org/project/pysane/
+BuildRequires:	python-devel >= 1:2.5
 BuildRequires:	python-numpy-numarray-devel
+BuildRequires:	python-pillow-devel
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	sed >= 4.0
 BuildRequires:	sane-backends-devel
-Requires:	python-PIL
 Requires:	python-numpy-numarray
+Requires:	python-pillow
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -29,6 +31,8 @@ do skanerów i urządzeń przechwytujących ramki obrazu dla Linuksa.
 %prep
 %setup -q -n pysane-%{version}
 
+%{__sed} -i -e "s,^PIL_IMAGING_DIR.*,import sysconfig\nPIL_IMAGING_DIR = sysconfig.get_path('include') + '/Imaging'," setup.py
+
 %build
 %py_build
 
@@ -47,6 +51,4 @@ rm -rf $RPM_BUILD_ROOT
 %doc README
 %attr(755,root,root) %{py_sitedir}/_sane.so
 %{py_sitedir}/sane.py[co]
-%if "%{py_ver}" > "2.4"
 %{py_sitedir}/pysane-%{version}-py*.egg-info
-%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pysane.git/commitdiff/593b46568043b8bbfd773e6733f7e34500c0e249



More information about the pld-cvs-commit mailing list