[arch-commits] Commit in python-pillow/repos (6 files)

Kyle Keen kkeen at nymeria.archlinux.org
Sun Sep 15 21:53:08 UTC 2013


    Date: Sunday, September 15, 2013 @ 23:53:08
  Author: kkeen
Revision: 97265

archrelease: copy trunk to community-staging-i686, community-staging-x86_64

Added:
  python-pillow/repos/community-staging-i686/PKGBUILD
    (from rev 97264, python-pillow/trunk/PKGBUILD)
  python-pillow/repos/community-staging-i686/pull325.diff
    (from rev 97264, python-pillow/trunk/pull325.diff)
  python-pillow/repos/community-staging-x86_64/PKGBUILD
    (from rev 97264, python-pillow/trunk/PKGBUILD)
  python-pillow/repos/community-staging-x86_64/pull325.diff
    (from rev 97264, python-pillow/trunk/pull325.diff)
Deleted:
  python-pillow/repos/community-staging-i686/PKGBUILD
  python-pillow/repos/community-staging-x86_64/PKGBUILD

---------------------------------------+
 /PKGBUILD                             |  136 ++++++++++++++++++++++++++++++++
 community-staging-i686/PKGBUILD       |   64 ---------------
 community-staging-i686/pull325.diff   |   38 ++++++++
 community-staging-x86_64/PKGBUILD     |   64 ---------------
 community-staging-x86_64/pull325.diff |   38 ++++++++
 5 files changed, 212 insertions(+), 128 deletions(-)

Deleted: community-staging-i686/PKGBUILD
===================================================================
--- community-staging-i686/PKGBUILD	2013-09-15 21:52:25 UTC (rev 97264)
+++ community-staging-i686/PKGBUILD	2013-09-15 21:53:08 UTC (rev 97265)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Kyle Keen <keenerd at gmail.com>
-# Contributor: minder
-
-pkgbase=python-pillow
-pkgname=(python-pillow python2-pillow)
-_appname=Pillow
-pkgver=2.1.0
-pkgrel=4
-pkgdesc="Python Imaging Library (PIL) fork. Python3 version."
-arch=('i686' 'x86_64')
-url="http://python-imaging.github.io/"
-license=('BSD')
-makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
-source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip")
-md5sums=('ec630d8ae15d4a3c4ae7b7efdeac8200')
-
-build() {
-  cd "$srcdir"
-  cp -r "$srcdir/$_appname-$pkgver" "$srcdir/${_appname}2-$pkgver"
-}  
-
-package_python-pillow() {
-  depends=('python' 'lcms' 'libwebp')
-  optdepends=('tk: for the ImageTK module'
-              'sane: for the Sane module'
-              'python-pyqt4: for the ImageQt module')
-  cd "$srcdir/$_appname-$pkgver"
-  python3 setup.py install --root="$pkgdir/" --optimize=0
-  pushd Sane
-    python3 setup.py install --root="$pkgdir/" --optimize=0
-  popd
-  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
-  # clean up bins
-  cd "$pkgdir/usr/bin"
-  for f in *.py; do
-    mv "$f" "${f%.py}"
-  done
-}
-
-package_python2-pillow() {
-  pkgdesc="Python Imaging Library (PIL) fork. Python2 version."
-  depends=('python2' 'lcms' 'libwebp')
-  optdepends=('tk: for the ImageTK module'
-              'sane: for the Sane module'
-              'python2-pyqt4: for the ImageQt module')
-  provides=('python-imaging' 'python2-imaging')
-  conflicts=('python-imaging' 'python2-imaging')
-  replaces=('python2-imaging')
-  cd "$srcdir/${_appname}2-$pkgver"
-  python2 setup.py install --root="$pkgdir/" --optimize=0
-  pushd Sane
-    python2 setup.py install --root="$pkgdir/" --optimize=0
-  popd
-  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
-  # clean up bins
-  cd "$pkgdir/usr/bin"
-  for f in *.py; do
-    mv "$f" "${f%.py}2"
-  done
-}
-

Copied: python-pillow/repos/community-staging-i686/PKGBUILD (from rev 97264, python-pillow/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2013-09-15 21:53:08 UTC (rev 97265)
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: minder
+
+pkgbase=python-pillow
+pkgname=(python-pillow python2-pillow)
+_appname=Pillow
+pkgver=2.1.0
+pkgrel=5
+pkgdesc="Python Imaging Library (PIL) fork. Python3 version."
+arch=('i686' 'x86_64')
+url="http://python-imaging.github.io/"
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
+# remove pull325.diff on 2.1.1 release, fixes FS#36945
+source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip"
+  "pull325.diff")
+md5sums=('ec630d8ae15d4a3c4ae7b7efdeac8200'
+         'aa3fa12bd2d61041f6d01fedddab39fb')
+
+build() {
+  cd "$srcdir"
+  cp -r "$srcdir/$_appname-$pkgver" "$srcdir/${_appname}2-$pkgver"
+}  
+
+package_python-pillow() {
+  depends=('python' 'lcms' 'libwebp')
+  optdepends=('tk: for the ImageTK module'
+              'sane: for the Sane module'
+              'python-pyqt4: for the ImageQt module')
+  cd "$srcdir/$_appname-$pkgver"
+  python3 setup.py install --root="$pkgdir/" --optimize=0
+  pushd Sane
+    python3 setup.py install --root="$pkgdir/" --optimize=0
+  popd
+  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # clean up bins
+  cd "$pkgdir/usr/bin"
+  for f in *.py; do
+    mv "$f" "${f%.py}"
+  done
+}
+
+package_python2-pillow() {
+  pkgdesc="Python Imaging Library (PIL) fork. Python2 version."
+  depends=('python2' 'lcms' 'libwebp')
+  optdepends=('tk: for the ImageTK module'
+              'sane: for the Sane module'
+              'python2-pyqt4: for the ImageQt module')
+  provides=('python-imaging' 'python2-imaging')
+  conflicts=('python-imaging' 'python2-imaging')
+  replaces=('python2-imaging')
+  cd "$srcdir/${_appname}2-$pkgver"
+  patch -Np1 -i ../pull325.diff
+  python2 setup.py install --root="$pkgdir/" --optimize=0
+  pushd Sane
+    python2 setup.py install --root="$pkgdir/" --optimize=0
+  popd
+  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # clean up bins
+  cd "$pkgdir/usr/bin"
+  for f in *.py; do
+    mv "$f" "${f%.py}2"
+  done
+}
+

Copied: python-pillow/repos/community-staging-i686/pull325.diff (from rev 97264, python-pillow/trunk/pull325.diff)
===================================================================
--- community-staging-i686/pull325.diff	                        (rev 0)
+++ community-staging-i686/pull325.diff	2013-09-15 21:53:08 UTC (rev 97265)
@@ -0,0 +1,38 @@
+diff --git a/PIL/Image.py b/PIL/Image.py
+index bb15aaa..2e120e5 100644
+--- a/PIL/Image.py
++++ b/PIL/Image.py
+@@ -706,7 +706,7 @@ def convert(self, mode=None, data=None, dither=None,
+         if self.mode == "L" and mode == "RGBA" and "transparency" in self.info:
+             from PIL import ImagePalette
+             self.mode = "P"
+-            bytePalette = bytes([i//3 for i in range(768)])
++            bytePalette = bytes(bytearray([i//3 for i in range(768)]))
+             self.palette = ImagePalette.raw("RGB", bytePalette)
+             self.palette.dirty = 1
+             self.load()
+diff --git a/_imaging.c b/_imaging.c
+index 9f48030..84f06e9 100644
+--- a/_imaging.c
++++ b/_imaging.c
+@@ -287,6 +287,7 @@ int PyImaging_GetBuffer(PyObject* buffer, Py_buffer *view)
+ static const char* wrong_raw_mode = "unrecognized raw mode";
+ static const char* outside_image = "image index out of range";
+ static const char* outside_palette = "palette index out of range";
++static const char* wrong_palette_size = "invalid palette size";
+ static const char* no_palette = "image has no palette";
+ static const char* readonly = "image is readonly";
+ /* static const char* no_content = "image has no content"; */
+@@ -1413,6 +1414,11 @@ int PyImaging_GetBuffer(PyObject* buffer, Py_buffer *view)
+     return NULL;
+     }
+ 
++    if ( palettesize * 8 / bits > 256) {
++    PyErr_SetString(PyExc_ValueError, wrong_palette_size);
++    return NULL;
++    }
++
+     ImagingPaletteDelete(self->image->palette);
+ 
+     strcpy(self->image->mode, "P");
+

Deleted: community-staging-x86_64/PKGBUILD
===================================================================
--- community-staging-x86_64/PKGBUILD	2013-09-15 21:52:25 UTC (rev 97264)
+++ community-staging-x86_64/PKGBUILD	2013-09-15 21:53:08 UTC (rev 97265)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Kyle Keen <keenerd at gmail.com>
-# Contributor: minder
-
-pkgbase=python-pillow
-pkgname=(python-pillow python2-pillow)
-_appname=Pillow
-pkgver=2.1.0
-pkgrel=4
-pkgdesc="Python Imaging Library (PIL) fork. Python3 version."
-arch=('i686' 'x86_64')
-url="http://python-imaging.github.io/"
-license=('BSD')
-makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
-source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip")
-md5sums=('ec630d8ae15d4a3c4ae7b7efdeac8200')
-
-build() {
-  cd "$srcdir"
-  cp -r "$srcdir/$_appname-$pkgver" "$srcdir/${_appname}2-$pkgver"
-}  
-
-package_python-pillow() {
-  depends=('python' 'lcms' 'libwebp')
-  optdepends=('tk: for the ImageTK module'
-              'sane: for the Sane module'
-              'python-pyqt4: for the ImageQt module')
-  cd "$srcdir/$_appname-$pkgver"
-  python3 setup.py install --root="$pkgdir/" --optimize=0
-  pushd Sane
-    python3 setup.py install --root="$pkgdir/" --optimize=0
-  popd
-  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
-  # clean up bins
-  cd "$pkgdir/usr/bin"
-  for f in *.py; do
-    mv "$f" "${f%.py}"
-  done
-}
-
-package_python2-pillow() {
-  pkgdesc="Python Imaging Library (PIL) fork. Python2 version."
-  depends=('python2' 'lcms' 'libwebp')
-  optdepends=('tk: for the ImageTK module'
-              'sane: for the Sane module'
-              'python2-pyqt4: for the ImageQt module')
-  provides=('python-imaging' 'python2-imaging')
-  conflicts=('python-imaging' 'python2-imaging')
-  replaces=('python2-imaging')
-  cd "$srcdir/${_appname}2-$pkgver"
-  python2 setup.py install --root="$pkgdir/" --optimize=0
-  pushd Sane
-    python2 setup.py install --root="$pkgdir/" --optimize=0
-  popd
-  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-
-  # clean up bins
-  cd "$pkgdir/usr/bin"
-  for f in *.py; do
-    mv "$f" "${f%.py}2"
-  done
-}
-

Copied: python-pillow/repos/community-staging-x86_64/PKGBUILD (from rev 97264, python-pillow/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2013-09-15 21:53:08 UTC (rev 97265)
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: minder
+
+pkgbase=python-pillow
+pkgname=(python-pillow python2-pillow)
+_appname=Pillow
+pkgver=2.1.0
+pkgrel=5
+pkgdesc="Python Imaging Library (PIL) fork. Python3 version."
+arch=('i686' 'x86_64')
+url="http://python-imaging.github.io/"
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools' 'lcms' 'libwebp' 'tk' 'sane')
+# remove pull325.diff on 2.1.1 release, fixes FS#36945
+source=("http://pypi.python.org/packages/source/P/$_appname/$_appname-$pkgver.zip"
+  "pull325.diff")
+md5sums=('ec630d8ae15d4a3c4ae7b7efdeac8200'
+         'aa3fa12bd2d61041f6d01fedddab39fb')
+
+build() {
+  cd "$srcdir"
+  cp -r "$srcdir/$_appname-$pkgver" "$srcdir/${_appname}2-$pkgver"
+}  
+
+package_python-pillow() {
+  depends=('python' 'lcms' 'libwebp')
+  optdepends=('tk: for the ImageTK module'
+              'sane: for the Sane module'
+              'python-pyqt4: for the ImageQt module')
+  cd "$srcdir/$_appname-$pkgver"
+  python3 setup.py install --root="$pkgdir/" --optimize=0
+  pushd Sane
+    python3 setup.py install --root="$pkgdir/" --optimize=0
+  popd
+  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # clean up bins
+  cd "$pkgdir/usr/bin"
+  for f in *.py; do
+    mv "$f" "${f%.py}"
+  done
+}
+
+package_python2-pillow() {
+  pkgdesc="Python Imaging Library (PIL) fork. Python2 version."
+  depends=('python2' 'lcms' 'libwebp')
+  optdepends=('tk: for the ImageTK module'
+              'sane: for the Sane module'
+              'python2-pyqt4: for the ImageQt module')
+  provides=('python-imaging' 'python2-imaging')
+  conflicts=('python-imaging' 'python2-imaging')
+  replaces=('python2-imaging')
+  cd "$srcdir/${_appname}2-$pkgver"
+  patch -Np1 -i ../pull325.diff
+  python2 setup.py install --root="$pkgdir/" --optimize=0
+  pushd Sane
+    python2 setup.py install --root="$pkgdir/" --optimize=0
+  popd
+  install -Dm644 docs/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # clean up bins
+  cd "$pkgdir/usr/bin"
+  for f in *.py; do
+    mv "$f" "${f%.py}2"
+  done
+}
+

Copied: python-pillow/repos/community-staging-x86_64/pull325.diff (from rev 97264, python-pillow/trunk/pull325.diff)
===================================================================
--- community-staging-x86_64/pull325.diff	                        (rev 0)
+++ community-staging-x86_64/pull325.diff	2013-09-15 21:53:08 UTC (rev 97265)
@@ -0,0 +1,38 @@
+diff --git a/PIL/Image.py b/PIL/Image.py
+index bb15aaa..2e120e5 100644
+--- a/PIL/Image.py
++++ b/PIL/Image.py
+@@ -706,7 +706,7 @@ def convert(self, mode=None, data=None, dither=None,
+         if self.mode == "L" and mode == "RGBA" and "transparency" in self.info:
+             from PIL import ImagePalette
+             self.mode = "P"
+-            bytePalette = bytes([i//3 for i in range(768)])
++            bytePalette = bytes(bytearray([i//3 for i in range(768)]))
+             self.palette = ImagePalette.raw("RGB", bytePalette)
+             self.palette.dirty = 1
+             self.load()
+diff --git a/_imaging.c b/_imaging.c
+index 9f48030..84f06e9 100644
+--- a/_imaging.c
++++ b/_imaging.c
+@@ -287,6 +287,7 @@ int PyImaging_GetBuffer(PyObject* buffer, Py_buffer *view)
+ static const char* wrong_raw_mode = "unrecognized raw mode";
+ static const char* outside_image = "image index out of range";
+ static const char* outside_palette = "palette index out of range";
++static const char* wrong_palette_size = "invalid palette size";
+ static const char* no_palette = "image has no palette";
+ static const char* readonly = "image is readonly";
+ /* static const char* no_content = "image has no content"; */
+@@ -1413,6 +1414,11 @@ int PyImaging_GetBuffer(PyObject* buffer, Py_buffer *view)
+     return NULL;
+     }
+ 
++    if ( palettesize * 8 / bits > 256) {
++    PyErr_SetString(PyExc_ValueError, wrong_palette_size);
++    return NULL;
++    }
++
+     ImagingPaletteDelete(self->image->palette);
+ 
+     strcpy(self->image->mode, "P");
+




More information about the arch-commits mailing list