Skip to contentSkip to conversation

package/python-pillow: new package

PATCH Superseded Angelo Compagnucci 2 participants 3 messages Jun 12, 2016 – Jun 13, 2016

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 package/python-pillow: new package

This patch adds python pillow, the friendly python fork, it includes a backported patch to disable configuration platfom guessing.

---
 package/Config.in                                  |  1 +
 ...y-add-option-to-disable-platform-guessing.patch | 63 ++++++++++++++++++++++
 package/python-pillow/Config.in                    | 12 +++++
 package/python-pillow/python-pillow.hash           |  2 +
 package/python-pillow/python-pillow.mk             | 39 ++++++++++++++
 5 files changed, 117 insertions(+)
 create mode 100644 package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch
 create mode 100644 package/python-pillow/Config.in
 create mode 100644 package/python-pillow/python-pillow.hash
 create mode 100644 package/python-pillow/python-pillow.mk
package/Config.in +1 -0
index 3d99d72..a26043d 100644
@@ -704,6 +704,7 @@ menu "External python modules"
 	source "package/python-pathtools/Config.in"
 	source "package/python-pathvalidate/Config.in"
 	source "package/python-pexpect/Config.in"
+	source "package/python-pillow/Config.in"
 	source "package/python-posix-ipc/Config.in"
 	source "package/python-protobuf/Config.in"
 	source "package/python-psutil/Config.in"
package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch new file +63 -0

63 lines not on this page · raw message

package/python-pillow/Config.in new file +12 -0
new file mode 100644
index 0000000..d5c3809
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_PYTHON_PILLOW
+	bool "python-pillow"
+	help
+	  Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is
+	  the Python Imaging Library by Fredrik Lundh and Contributors.
+
+	  Pillow relies on external libraries to provide support various
+	  image formats. Select the corresponding package(s) to get this
+	  support. Pillow can use jpeg, zlib (for PNG), tiff, freetype, webp,
+	  and openjpeg (JPEG-2000).
+
+	  https://pypi.python.org/pypi/Pillow/
package/python-pillow/python-pillow.hash new file +2 -0
new file mode 100644
index 0000000..0fc349c
@@ -0,0 +1,2 @@
+https://pypi.python.org/pypi?:action=show_md5&digest=7cfd093c11205d9e2ebe3c51dfcad510
+md5 7cfd093c11205d9e2ebe3c51dfcad510  Pillow-3.2.0.tar.gz
package/python-pillow/python-pillow.mk new file +39 -0
new file mode 100644
index 0000000..f186ab6
@@ -0,0 +1,39 @@
+################################################################################
+#
+# python-pillow
+#
+################################################################################
+
+PYTHON_PILLOW_VERSION = 3.2.0
+PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
+PYTHON_PILLOW_SITE = https://pypi.python.org/packages/source/P/Pillow
+PYTHON_PILLOW_SETUP_TYPE = setuptools
+PYTHON_PILLOW_DEPENDENCIES = $(if $(BR2_PACKAGE_JPEG),jpeg) \
+      $(if $(BR2_PACKAGE_ZLIB),zlib) \
+      $(if $(BR2_PACKAGE_TIFF),tiff) \
+      $(if $(BR2_PACKAGE_FREETYPE),freetype) \
+      $(if $(BR2_PACKAGE_WEBP),webp) \
+      $(if $(BR2_PACKAGE_OPENJPEG),openjpeg)
+
+PYTHON_PILLOW_BUILD_OPTS += --disable-platform-guessing
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_JPEG),--enable-jpeg,--disable-jpeg)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_ZLIB),--enable-zlib,--disable-zlib)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_TIFF),--enable-tiff,--disable-tiff)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_FREETYPE),--enable-freetype,--disable-freetype)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_WEBP),--enable-webp,--disable-webp)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_OPENJPEG),--enable-jpeg2000,--disable-jpeg2000)
+
+PYTHON_PILLOW_INSTALL_TARGET_OPTS += $(PYTHON_PILLOW_BUILD_OPTS)
+
+PYTHON_PILLOW_BUILD_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+		$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+		$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+		$(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS))
+
+PYTHON_PILLOW_INSTALL_TARGET_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+		$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+		$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+		$(PYTHON_PILLOW_INSTALL_TARGET_OPTS) install \
+		$(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS))
+
+$(eval $(python-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v4 1/1 package/python-pillow: new package

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Angelo" == Angelo Compagnucci <[email protected]> writes:

This patch adds python pillow, the friendly python fork, it includes a backported patch to disable configuration platfom guessing.

It is afaik a fork of the python imaging library, not of python.

Quoted 15 lines
---
 package/Config.in                                  |  1 +
 ...y-add-option-to-disable-platform-guessing.patch | 63 ++++++++++++++++++++++
 package/python-pillow/Config.in                    | 12 +++++
 package/python-pillow/python-pillow.hash           |  2 +
 package/python-pillow/python-pillow.mk             | 39 ++++++++++++++
 5 files changed, 117 insertions(+)
 create mode 100644 package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch
 create mode 100644 package/python-pillow/Config.in
 create mode 100644 package/python-pillow/python-pillow.hash
 create mode 100644 package/python-pillow/python-pillow.mk

+++ b/package/python-pillow/python-pillow.hash

package/python-pillow/python-pillow.hash line 2

Quoted 2 lines
package/python-pillow/python-pillow.hash new file +2 -0
@@ -0,0 +1,2 @@
+https://pypi.python.org/pypi?:action=show_md5&digest=7cfd093c11205d9e2ebe3c51dfcad510
+md5 7cfd093c11205d9e2ebe3c51dfcad510  Pillow-3.2.0.tar.gz

Please also provide a stronger hash like sha256.

Quoted 22 lines
package/python-pillow/python-pillow.mk new file +16 -0
new file mode 100644
index 0000000..f186ab6
@@ -0,0 +1,39 @@
+################################################################################
+#
+# python-pillow
+#
+################################################################################
+
+PYTHON_PILLOW_VERSION = 3.2.0
+PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
+PYTHON_PILLOW_SITE = https://pypi.python.org/packages/source/P/Pillow
+PYTHON_PILLOW_SETUP_TYPE = setuptools
+PYTHON_PILLOW_DEPENDENCIES = $(if $(BR2_PACKAGE_JPEG),jpeg) \
+      $(if $(BR2_PACKAGE_ZLIB),zlib) \
+      $(if $(BR2_PACKAGE_TIFF),tiff) \
+      $(if $(BR2_PACKAGE_FREETYPE),freetype) \
+      $(if $(BR2_PACKAGE_WEBP),webp) \
+      $(if $(BR2_PACKAGE_OPENJPEG),openjpeg)

package/python-pillow/python-pillow.mk line 26

Quoted 10 lines
package/python-pillow/python-pillow.mk new file +10 -0
+
+PYTHON_PILLOW_BUILD_OPTS += --disable-platform-guessing
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_JPEG),--enable-jpeg,--disable-jpeg)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_ZLIB),--enable-zlib,--disable-zlib)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_TIFF),--enable-tiff,--disable-tiff)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_FREETYPE),--enable-freetype,--disable-freetype)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_WEBP),--enable-webp,--disable-webp)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_OPENJPEG),--enable-jpeg2000,--disable-jpeg2000)
+
+PYTHON_PILLOW_INSTALL_TARGET_OPTS += $(PYTHON_PILLOW_BUILD_OPTS)

If these are build options, why are you passing them to the install step?

Why are you using += and not just = ? The default value of _INSTALL_TARGET_OPTS will only be set when python-package is evaluated below, so this will not append to the default.

package/python-pillow/python-pillow.mk line 31

Quoted 5 lines
package/python-pillow/python-pillow.mk new file +5 -0
+
+PYTHON_PILLOW_BUILD_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+		$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+		$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+		$(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS))

Isn't this identical to the default build commands (with PYTHON_PILLOW_BASE_BUILD_TGT = build_ext)?

package/python-pillow/python-pillow.mk line 38

Quoted 7 lines
package/python-pillow/python-pillow.mk new file +7 -0
+
+PYTHON_PILLOW_INSTALL_TARGET_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+		$(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+		$(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+		$(PYTHON_PILLOW_INSTALL_TARGET_OPTS) install \
+		$(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS))
+

And this to the default target install. Why do you need to run build_ext again?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH v4 1/1 package/python-pillow: new package

Dear Peter Korsgaard,

2016-06-13 16:48 GMT+02:00 Peter Korsgaard <[email protected]>:

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Angelo" == Angelo Compagnucci <[email protected]> writes:

This patch adds python pillow, the friendly python fork, it includes a backported patch to disable configuration platfom guessing.

It is afaik a fork of the python imaging library, not of python.

Ops!

Quoted 13 lines
Quoted 12 lines
---
 package/Config.in                                  |  1 +
 ...y-add-option-to-disable-platform-guessing.patch | 63 ++++++++++++++++++++++
 package/python-pillow/Config.in                    | 12 +++++
 package/python-pillow/python-pillow.hash           |  2 +
 package/python-pillow/python-pillow.mk             | 39 ++++++++++++++
 5 files changed, 117 insertions(+)
 create mode 100644 package/python-pillow/0001-setup.py-add-option-to-disable-platform-guessing.patch
 create mode 100644 package/python-pillow/Config.in
 create mode 100644 package/python-pillow/python-pillow.hash
 create mode 100644 package/python-pillow/python-pillow.mk
Quoted 6 lines

package/python-pillow/python-pillow.hash line 2

Quoted 4 lines

+++ b/package/python-pillow/python-pillow.hash

package/python-pillow/python-pillow.hash new file +2 -0
@@ -0,0 +1,2 @@
+https://pypi.python.org/pypi?:action=show_md5&digest=7cfd093c11205d9e2ebe3c51dfcad510
+md5 7cfd093c11205d9e2ebe3c51dfcad510  Pillow-3.2.0.tar.gz

Please also provide a stronger hash like sha256.

Right!

Quoted 27 lines
Quoted 27 lines
package/python-pillow/python-pillow.mk new file +21 -0
new file mode 100644
index 0000000..f186ab6
@@ -0,0 +1,39 @@
+################################################################################
+#
+# python-pillow
+#
+################################################################################
+
+PYTHON_PILLOW_VERSION = 3.2.0
+PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).tar.gz
+PYTHON_PILLOW_SITE = https://pypi.python.org/packages/source/P/Pillow
+PYTHON_PILLOW_SETUP_TYPE = setuptools
+PYTHON_PILLOW_DEPENDENCIES = $(if $(BR2_PACKAGE_JPEG),jpeg) \
+      $(if $(BR2_PACKAGE_ZLIB),zlib) \
+      $(if $(BR2_PACKAGE_TIFF),tiff) \
+      $(if $(BR2_PACKAGE_FREETYPE),freetype) \
+      $(if $(BR2_PACKAGE_WEBP),webp) \
+      $(if $(BR2_PACKAGE_OPENJPEG),openjpeg)
+
+PYTHON_PILLOW_BUILD_OPTS += --disable-platform-guessing
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_JPEG),--enable-jpeg,--disable-jpeg)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_ZLIB),--enable-zlib,--disable-zlib)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_TIFF),--enable-tiff,--disable-tiff)
Quoted 8 lines

package/python-pillow/python-pillow.mk line 26

Quoted 5 lines
package/python-pillow/python-pillow.mk new file +5 -0
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_FREETYPE),--enable-freetype,--disable-freetype)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_WEBP),--enable-webp,--disable-webp)
+PYTHON_PILLOW_BUILD_OPTS += $(if $(BR2_PACKAGE_OPENJPEG),--enable-jpeg2000,--disable-jpeg2000)
+
+PYTHON_PILLOW_INSTALL_TARGET_OPTS += $(PYTHON_PILLOW_BUILD_OPTS)

If these are build options, why are you passing them to the install step?

Cause this package as a strange build/install system and requires the same set of option both in build and install steps.

Quoted 3 lines

Why are you using += and not just = ? The default value of _INSTALL_TARGET_OPTS will only be set when python-package is evaluated below, so this will not append to the default.

I've not dug so deep inside python-package handling, so I used +=.

Quoted 8 lines

package/python-pillow/python-pillow.mk line 31

Quoted 5 lines
package/python-pillow/python-pillow.mk new file +5 -0
+
+PYTHON_PILLOW_BUILD_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+            $(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+            $(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+            $(PYTHON_PILLOW_BASE_BUILD_OPTS) $(PYTHON_PILLOW_BUILD_OPTS))

Isn't this identical to the default build commands (with PYTHON_PILLOW_BASE_BUILD_TGT = build_ext)?

In a previous review [1] was said to me to rewrite both BUILD_CMDS and INSTALL_TARGET_CMDS instead of modifying PYTHON_PILLOW_BASE_BUILD_TGT cause this is the first package to have such need.

Quoted 10 lines

package/python-pillow/python-pillow.mk line 38

Quoted 7 lines
package/python-pillow/python-pillow.mk new file +7 -0
+
+PYTHON_PILLOW_INSTALL_TARGET_CMDS = (cd $(PYTHON_PILLOW_BUILDDIR); \
+            $(PYTHON_PILLOW_BASE_ENV) $(PYTHON_PILLOW_ENV) \
+            $(PYTHON_PILLOW_PYTHON_INTERPRETER) setup.py build_ext \
+            $(PYTHON_PILLOW_INSTALL_TARGET_OPTS) install \
+            $(PYTHON_PILLOW_BASE_INSTALL_TARGET_OPTS))
+

And this to the default target install. Why do you need to run build_ext again?

Cause the install step of this package doesn't work if called without build_ext.

[1] http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/141233/match=pillow

Sincerely, Angelo

Quoted 3 lines

--
Bye, Peter Korsgaard

Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo