[python26-imaging/el5/master] Import Review #668588

stevetraylen stevetraylen at fedoraproject.org
Wed Jan 26 18:09:38 UTC 2011


commit 0b86864aad9310894095c83d68e42cd623c6c651
Author: Steve Traylen <steve.traylen at cern.ch>
Date:   Wed Jan 26 19:09:19 2011 +0100

    Import Review #668588

 .gitignore                              |    1 +
 python26-imaging-1.1.6-sane-types.patch |   13 +
 python26-imaging-giftrans.patch         |   14 ++
 python26-imaging-lib64.patch            |   10 +
 python26-imaging-shebang.patch          |   36 +++
 python26-imaging.spec                   |  366 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 7 files changed, 441 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c2cc197 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Imaging-1.1.7.tar.gz
diff --git a/python26-imaging-1.1.6-sane-types.patch b/python26-imaging-1.1.6-sane-types.patch
new file mode 100644
index 0000000..8263f7c
--- /dev/null
+++ b/python26-imaging-1.1.6-sane-types.patch
@@ -0,0 +1,13 @@
+--- 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;
diff --git a/python26-imaging-giftrans.patch b/python26-imaging-giftrans.patch
new file mode 100644
index 0000000..1a109d2
--- /dev/null
+++ b/python26-imaging-giftrans.patch
@@ -0,0 +1,14 @@
+--- Imaging-1.1.6.orig/PIL/GifImagePlugin.py    2006-12-03 11:37:15.000000000 +0000
++++ Imaging-1.1.6/PIL/GifImagePlugin.py 2008-10-02 14:51:43.000000000 +0100
+@@ -352,6 +352,11 @@
+         for i in range(maxcolor):
+             s.append(chr(i) * 3)
+ 
++    if im.info.has_key('transparency'):
++        transparentIndex = im.info['transparency']
++        s.append('!' + chr(0xf9) + chr(4) + chr(1) + chr(0) + chr(0) +
++                 chr(transparentIndex) + chr(0))
++
+     return s
+ 
+ def getdata(im, offset = (0, 0), **params):
diff --git a/python26-imaging-lib64.patch b/python26-imaging-lib64.patch
new file mode 100644
index 0000000..878ee2f
--- /dev/null
+++ b/python26-imaging-lib64.patch
@@ -0,0 +1,10 @@
+--- Imaging-1.1.6.orig/setup.py 2006-12-03 11:37:29.000000000 +0000
++++ Imaging-1.1.6/setup.py      2008-10-02 14:51:43.000000000 +0100
+@@ -196,6 +196,7 @@
+         add_directory(library_dirs, "/usr/local/lib")
+         add_directory(include_dirs, "/usr/local/include")
+ 
++        add_directory(library_dirs, "/usr/lib64")
+         add_directory(library_dirs, "/usr/lib")
+         add_directory(include_dirs, "/usr/include")
+ 
diff --git a/python26-imaging-shebang.patch b/python26-imaging-shebang.patch
new file mode 100644
index 0000000..339babb
--- /dev/null
+++ b/python26-imaging-shebang.patch
@@ -0,0 +1,36 @@
+diff -up Imaging-1.1.7/Sane/demo_numarray.py.shebang Imaging-1.1.7/Sane/demo_numarray.py
+--- Imaging-1.1.7/Sane/demo_numarray.py.shebang	2009-11-01 01:44:12.000000000 +0100
++++ Imaging-1.1.7/Sane/demo_numarray.py	2010-05-27 12:43:49.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ 
+ #
+ # Shows how to scan a 16 bit grayscale image into a numarray object
+diff -up Imaging-1.1.7/Sane/demo_pil.py.shebang Imaging-1.1.7/Sane/demo_pil.py
+--- Imaging-1.1.7/Sane/demo_pil.py.shebang	2009-11-01 01:44:12.000000000 +0100
++++ Imaging-1.1.7/Sane/demo_pil.py	2010-05-27 12:43:49.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ 
+ #
+ # Shows how to scan a color image into a PIL rgb-image
+diff -up Imaging-1.1.7/Scripts/pildriver.py.shebang Imaging-1.1.7/Scripts/pildriver.py
+--- Imaging-1.1.7/Scripts/pildriver.py.shebang	2009-11-01 23:08:46.000000000 +0100
++++ Imaging-1.1.7/Scripts/pildriver.py	2010-05-27 12:43:49.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ """PILdriver, an image-processing calculator using PIL.
+ 
+ An instance of class PILDriver is essentially a software stack machine
+diff -up Imaging-1.1.7/setup.py.shebang Imaging-1.1.7/setup.py
+--- Imaging-1.1.7/setup.py.shebang	2010-05-27 12:43:49.000000000 +0200
++++ Imaging-1.1.7/setup.py	2010-05-27 12:44:27.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python
+ #
+ # Setup script for PIL 1.1.5 and later
+ #
diff --git a/python26-imaging.spec b/python26-imaging.spec
new file mode 100644
index 0000000..4b760f7
--- /dev/null
+++ b/python26-imaging.spec
@@ -0,0 +1,366 @@
+%global __python26 /usr/bin/python2.6
+%global python26_sitearch %{_libdir}/python2.6/site-packages
+%global __os_install_post %{__python26_os_install_post}
+
+%global py_incdir %{_includedir}/python2.6
+
+Summary:       Python's own image processing library
+Name:          python26-imaging
+Version:       1.1.7
+Release:       4%{?dist}
+
+License:       MIT
+Group:         System Environment/Libraries
+
+Source0:       http://effbot.org/downloads/Imaging-%{version}.tar.gz
+Patch1:        %{name}-lib64.patch
+Patch2:        %{name}-giftrans.patch
+Patch3:        %{name}-1.1.6-sane-types.patch
+Patch4:        %{name}-shebang.patch
+URL:           http://www.pythonware.com/products/pil/
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires:      python(abi) = 2.6
+
+BuildRequires: python26-devel, libjpeg-devel, zlib-devel, freetype-devel
+BuildRequires: tkinter26, tk-devel, lcms-devel
+%ifnarch s390 s390x
+BuildRequires: sane-backends-devel
+%endif
+
+%description
+Python Imaging Library
+
+The Python Imaging Library (PIL) adds image processing capabilities
+to your Python interpreter.
+
+This library provides extensive file format support, an efficient
+internal representation, and powerful image processing capabilities.
+
+Notice that in order to reduce the package dependencies there are
+three sub-packages: devel (for development); tk (to interact with the
+tk interface) and sane (scanning devices interface).
+
+%package devel
+Summary: Development files for python-imaging
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}, python26-devel
+Requires: libjpeg-devel
+Requires: zlib-devel
+
+%description devel
+Development files for python-imaging.
+
+%ifnarch s390 s390x
+%package sane
+Summary: Python Module for using scanners
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: python(abi) = 2.6
+
+%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.
+%endif
+
+%package tk
+Summary: Tk interface for python-imaging
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: tkinter26
+
+%description tk
+This package contains a Tk interface for python-imaging.
+
+%prep
+%setup -q -n Imaging-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1 -b .sane-types
+%patch4 -p1 -b .shebang
+
+#remove CRLF line endings.
+sed -i 's/\r//' Docs/effbot.css
+# fix the interpreter path for Scripts/*.py
+cd Scripts
+for scr in *.py
+do
+  sed -e "s|/usr/local/bin/python|%{_bindir}/python2.6|"  $scr > tmp.py
+  mv tmp.py $scr
+  chmod 644 $scr
+done
+
+
+%build
+# Is this still relevant? (It was used in 1.1.4)
+#%%ifarch x86_64
+#   CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" \
+#%%endif
+
+CFLAGS="$RPM_OPT_FLAGS" %{__python26} setup.py build
+
+%ifnarch s390 s390x
+pushd Sane
+CFLAGS="$RPM_OPT_FLAGS" %{__python26} setup.py build
+popd
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{py_incdir}/Imaging
+install -m 644 libImaging/*.h $RPM_BUILD_ROOT/%{py_incdir}/Imaging
+%{__python26} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+%ifnarch s390 s390x
+pushd Sane
+%{__python26} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif
+
+# 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%{python26_sitearch}/PIL
+for file in *; do
+    case "$file" in
+    ImageTk*|SpiderImagePlugin*|_imagingtk.so)
+        what=files.tk
+        ;;
+    *)
+        what=files.main
+        ;;
+    esac
+    echo %{python26_sitearch}/PIL/$file >> "$p/$what"
+done
+popd
+
+
+%check
+# need some hacks
+sed -i "s|ROOT = \".\"|ROOT = \"$RPM_BUILD_ROOT%{python26_sitearch}\"|" selftest.py
+ln -s $PWD/Images $RPM_BUILD_ROOT%{python26_sitearch}/Images
+%{__python26} selftest.py
+rm $RPM_BUILD_ROOT%{python26_sitearch}/Images
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files -f files.main
+%defattr (-,root,root,-)
+%doc README CHANGES
+%{python26_sitearch}/PIL.pth
+%dir %{python26_sitearch}/PIL
+
+%files devel
+%defattr (0644,root,root,755)
+%{py_incdir}/Imaging
+%doc Docs Scripts Images
+
+%ifnarch s390 s390x
+%files sane
+%defattr (0644,root,root,755)
+%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
+%{python26_sitearch}/pysane*egg-info
+%{python26_sitearch}/_sane.so
+%{python26_sitearch}/sane.py*
+%endif
+
+%files tk -f files.tk
+
+%changelog
+* Tue Jan 11 2011 Steve Traylen <steve.traylen at cern.ch> - 1.1.7-4
+- Do not hardcode lib64 path.
+
+* Mon Dec 13 2010 Steve Traylen <steve.traylen at cern.ch> - 1.1.7-3
+- Adapt F15 spec file for a python26 package in EPEL5
+
+* Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 1.1.7-2
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Tue Jun 01 2010 Roman Rakus <rrakus at redhat.com> - 1.1.7-1
+- Update to 1.1.7
+
+* Tue Sep 08 2009 Joel Granados <jgranado at redhat.com> - 1.1.6-17
+- Fix the shebang issue.  See https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
+
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.6-16
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Wed Apr 15 2009 Karsten Hopp <karsten at redhat.com> 1.1.6-15
+- disable sane subpackage and sane requirements for mainframes, we don't have
+  sane on s390 and s390x
+
+* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.6-14
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 1.1.6-13
+- Rebuild for Python 2.6
+
+* Thu Oct  2 2008 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-12
+- all patches are applied with -p1
+
+* Thu Oct  2 2008 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-11
+- rebuild to avoid the patches fuzziness (#464984)
+
+* Tue Jun 3 2008 Joel Granados <jgranado at redhat.com> - 1.1.6-10
+- Fix the build.
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.1.6-9
+- Autorebuild for GCC 4.3
+
+* Fri Jan  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.1.6-8
+- Egg for PIL library is already in subdirectory, and found by glob.
+
+* Fri Jan  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.1.6-7
+- python_sitelib -> python_sitearch
+
+* Fri Jan  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.1.6-6
+- Support for Python Eggs for F9+
+
+* Thu Jan  3 2008 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-5
+- Rebuild for Tcl/Tk upgrade (F9+).
+- Update description to reflect the subpackages.
+- Fix files permission.
+
+* Tue Aug 28 2007 José Matos <jamatos[AT]fc.up.pt> - 1.1.6-4
+- Rebuild for devel (F8).
+
+* 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.
+
+* Tue Dec 12 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-7
+- Rebuild for python 2.5.
+
+* Tue Aug 29 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-6
+- Rebuild for FE6
+- Clean package, no need for python-abi requirement and ghost pyo files
+
+* Thu Apr  6 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-5
+- Rebuild because of #187739
+
+* Tue Apr  4 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-4
+- Rebuild
+
+* Tue Apr  4 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-3
+- Restore gif transparency patch. (bug #187875)
+
+* Sun Apr  2 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-2
+- Fix bug #185203 (Thanks to Rick L Vinyard Jr)
+
+* Sun Mar  5 2006 José Matos <jamatos[AT]fc.up.pt> - 1.1.5-1
+- Update to 1.1.5
+
+* Sun May 22 2005 Jeremy Katz <katzj at redhat.com> - 1.1.4-9
+- rebuild on all arches
+
+* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+- rebuilt
+
+* Mon Feb  7 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 0:1.1.4-7
+- Build PIC on x86_64 to fix x86_64 linking.
+
+* Sat Oct  9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.1.4-6
+- Borrow parts from patch in Debian's 1.1.4-3 to fix issues in bug 1038 as
+  well as a bunch of others.
+- Bring up to date with current fedora.us Python spec template recommendations.
+- Fix -devel directory permissions.
+
+* Sun Nov 30 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.4-0.fdr.5
+- added -devel package (thanks to patch from pmatilai at welho.com)
+- FC1 requires dependency to tcl-devel and tk-devel package
+
+* Wed Jul 16 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.4-0.fdr.4
+- bumped release
+- implemented changes from Ville, which basically means that:
+- setup macro now users "-q" option
+- libpng dropped from buildrequirements
+- run test suite after build
+
+* Sat Jul 12 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.4-0.fdr.3
+- fixed source0 to point into effbot.org instead of pythonware.com
+- changed references from python2 to python, since python in RH9 is
+  python 2.2.
+- removed percent signs from changelog.
+
+* Tue Jul 08 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.4-0.fdr.2
+- added XFree86-devel and tkinter into buildrequires.
+- removed version info from buildrequires
+- removed unnecessary stuff from requires.
+
+* Wed Jun 23 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.4-0.fdr.1
+- new upstream version
+
+* Tue May 20 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.3-0.fdr.5
+- added python2-devel into buildrequires.
+- added versionm variable into setup macro instead of hard coded
+  version number.
+
+* Mon May 12 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.3-0.fdr.4
+- removed unnecessary ./configure
+- /usr/lib -> _libdir macro
+- smp flags to make
+
+* Sat May 03 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.3-0.fdr.3
+- changed buildroot macro back to $RP_BUILD_ROOT
+- ./configure to configure macro
+- Group to Development/Languages
+- Added Epoch values to versioned Requires and BuildRequires
+- added README and CHANGES-113 into doc
+
+* Wed Mar 26 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.3-0.fdr.2
+- added Epoch
+- added URL into Source0
+- replaced $RPM_BUILD_ROOT with buildroot macro
+
+* Wed Mar 26 2003 Juha Ylitalo <jylitalo at iki.fi> - 0:1.1.3-0.fdr.1
+- modified spec file to fit with fedora guidelines.
+
+* Mon Sep 23 2002 Juha Ylitalo <jylitalo at iki.fi> - 1.1.3-1
+- updated to 1.1.3
+- switched from python 1.5.2 to python 2.2
+- other modifications to make it build at minimal effort
+
+* Tue Sep 12 2000 Ray Garcia <rayg at ssec.wisc.edu>
+- update to 1.1
+
+* Thu Mar 30 2000 Frederic Lepied <flepied at mandrakesoft.com> 1.0b1-3mdk
+- group fix.
+
+* Mon Jan 10 2000 Lenny Cartier <lenny at mandrakesoft.com>
+- build for oxygen
+- deactivate provinding of tkinter lib since Chmouel one's works perfectly
+
+* Mon Dec 27 1999 Lenny Cartier <lenny at mandrakesoft.com>
+- new in contribs
+- bz2 archive
+
+* Mon Jan 11 1999 Oliver Andrich <oli at andrich.net>
+- upgraded to Imaging 1.0b1
+
+* Sun Dec 27 1998 Oliver Andrich <oli at andrich.net>
+- changed Setup file so that the tkinter module is compiled with Tix and BLT
+  support
+
+* Mon Jul 20 1998 Oliver Andrich <oli at andrich.net>
+- had to recompile and update the package to support the uptodate graphics
+  libs
+
+* Sat Jun 07 1998 Oliver Andrich <oli at andrich.net>
+- updated package to version 0.3a4
+
diff --git a/sources b/sources
index e69de29..87c6b72 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+fc14a54e1ce02a0225be8854bfba478e  Imaging-1.1.7.tar.gz


More information about the scm-commits mailing list