rpms/python-imaging/FC-6 python-imaging-1.1.6-sane-types.patch, NONE, 1.1 python-imaging.spec, 1.12, 1.13

Nils Philippsen (nphilipp) fedora-extras-commits at redhat.com
Mon Apr 30 07:53:23 UTC 2007


Author: nphilipp

Update of /cvs/extras/rpms/python-imaging/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5338

Modified Files:
	python-imaging.spec 
Added Files:
	python-imaging-1.1.6-sane-types.patch 
Log Message:
add sane subpackage, split off tk subpackage (#238252)
add sane-types patch
use -b for patches to save original files
correct groups
Resolves: #238252


python-imaging-1.1.6-sane-types.patch:

--- NEW FILE python-imaging-1.1.6-sane-types.patch ---
--- Imaging-1.1.6/Sane/_sane.c.types	2006-12-03 13:12:22.000000000 +0100
+++ Imaging-1.1.6/Sane/_sane.c	2007-04-28 11:41:19.000000000 +0200
@@ -1152,8 +1152,8 @@
 static PyObject *
 PySane_get_devices(PyObject *self, PyObject *args)
 {
-  SANE_Device **devlist;
-  SANE_Device *dev;
+  const SANE_Device **devlist;
+  const SANE_Device *dev;
   SANE_Status st;
   PyObject *list;
   int local_only, i;


Index: python-imaging.spec
===================================================================
RCS file: /cvs/extras/rpms/python-imaging/FC-6/python-imaging.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- python-imaging.spec	5 Feb 2007 19:53:48 -0000	1.12
+++ python-imaging.spec	30 Apr 2007 07:52:47 -0000	1.13
@@ -5,22 +5,22 @@
 Summary:       Python's own image processing library
 Name:          python-imaging
 Version:       1.1.6
-Release:       1%{?dist}
+Release:       3%{?dist}
 
 License:       BSD
-Group:         Development/Languages
+Group:         System Environment/Libraries
 
 Source0:       http://effbot.org/downloads/Imaging-%{version}.tar.gz
 Patch0:        %{name}-no-xv.patch
 Patch1:        %{name}-lib64.patch
 Patch2:        %{name}-giftrans.patch
+Patch3:        %{name}-1.1.6-sane-types.patch
 URL:           http://www.pythonware.com/products/pil/
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: python-devel, libjpeg-devel, zlib-devel, freetype-devel
 BuildRequires: tkinter, tk-devel
-
-Requires: tkinter
+BuildRequires: sane-backends-devel
 
 %description
 Python Imaging Library
@@ -34,8 +34,8 @@
 Details about licensing can be found from README file.
 
 %package devel
-Summary: Development files for python-imaging.
-Group: Development/Languages
+Summary: Development files for python-imaging
+Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}, python-devel
 Requires: libjpeg-devel
 Requires: zlib-devel
@@ -43,12 +43,32 @@
 %description devel
 Development files for python-imaging.
 
+%package sane
+Summary: Python Module for using scanners
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description sane
+This package contains the sane module for Python which provides access to
+various raster scanning devices such as flatbed scanners and digital cameras.
+
+%package tk
+Summary: Tk interface for python-imaging
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: tkinter
+Obsoletes: %{name} < 1.1.6-3
+Conflicts: %{name} < 1.1.6-3
+
+%description tk
+This package contains a Tk interface for python-imaging.
 
 %prep
 %setup -q -n Imaging-%{version}
 %patch0 -p1
 %patch1 -p0
 %patch2 -p1
+%patch3 -p1 -b .sane-types
 
 # fix the interpreter path for Scripts/*.py
 cd Scripts
@@ -67,6 +87,9 @@
 
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
 
+pushd Sane
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -74,33 +97,70 @@
 install -m 644 libImaging/*.h $RPM_BUILD_ROOT/%{py_incdir}/Imaging
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
+pushd Sane
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+
 # There is no need to ship the binaries since they are already packaged
 # in %doc
 rm -rf $RPM_BUILD_ROOT%{_bindir}
 
+# Separate files that need Tk and files that don't
+echo '%%defattr (0644,root,root,755)' > files.main
+echo '%%defattr (0644,root,root,755)' > files.tk
+p="$PWD"
+
+pushd $RPM_BUILD_ROOT%{python_sitearch}/PIL
+for file in *; do
+    case "$file" in
+    ImageTk*|SpiderImagePlugin*|_imagingtk.so)
+        what=files.tk
+        ;;
+    *)
+        what=files.main
+        ;;
+    esac
+    echo %{python_sitearch}/PIL/$file >> "$p/$what"
+done
+popd
+        
+
 %check || :
 PYTHONPATH=$(ls -1d build/lib.linux*) %{__python} selftest.py
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 
-%files
+%files -f files.main
 %defattr (-,root,root)
 %doc README CHANGES
 %{python_sitearch}/PIL.pth
 %dir %{python_sitearch}/PIL
-%{python_sitearch}/PIL/*.so
-%{python_sitearch}/PIL/*.py*
 
 %files devel
 %defattr (0644,root,root,755)
 %{py_incdir}/Imaging
-%doc Docs Scripts Images Sane
+%doc Docs Scripts Images
 
+%files sane
+%defattr (0644,root,root,755)
+%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
+%{python_sitearch}/_sane.so
+%{python_sitearch}/sane.py*
+
+%files tk -f files.tk
 
 %changelog
+* Sun Apr 29 2007 Nils Philippsen <nphilipp at redhat.com> - 1.1.6-3
+- add sane subpackage, split off tk subpackage (#238252)
+- add sane-types patch
+- use -b for patches to save original files
+- correct groups
+
+* Wed Feb 14 2007 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-2
+- Rebuild for Tcl/Tk downgrade (F7)
+
 * Mon Feb  5 2007 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-1
 - New upstream version.
 - Clean spec file and specify license as BSD.




More information about the scm-commits mailing list