summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-03-19 14:01:00 +0800
committerKhem Raj <raj.khem@gmail.com>2019-03-19 21:00:06 -0700
commit6cb4e90fcde2d383ebcf656e489ac84d1db422f1 (patch)
treec6972e6b28d8c11e7c800af226872566e5fdfe5b /meta-python
parent4ce1fb53568907701b0c9fa63ef96b863269c121 (diff)
downloadmeta-openembedded-6cb4e90fcde2d383ebcf656e489ac84d1db422f1.tar.gz
python3-pillow: add 5.4.1
- Set option by modify setup.py - Do not override do_compile to call `setup.py build_ext', it will missing options at do_install time which causing host contamination ... Found webp/demux.h Found library webpmux at /usr/lib/libwebpmux.so Found library webpdemux at /usr/lib/libwebpdemux.so /usr/include/pthread.h:682:6: error: 'regparm' is not valid on this platform ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/0001-explicitly-set-compile-options.patch39
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch61
-rw-r--r--meta-python/recipes-devtools/python/python3-pillow_5.4.1.bb28
3 files changed, 128 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-explicitly-set-compile-options.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-explicitly-set-compile-options.patch
new file mode 100644
index 000000000..de89ba005
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/0001-explicitly-set-compile-options.patch
@@ -0,0 +1,39 @@
1From 52879439f2976662140b76951f43f16e1d5ef08e Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 18 Mar 2019 23:23:55 -0400
4Subject: [PATCH] explicitly set compile options
5
6OE does not support to install egg package, so
7explicitly set build_ext options for oe-core's
8`setup.py install'
9
10Upstream-Status: Inappropriate [oe specific]
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 setup.cfg | 12 ++++++++++++
15 1 file changed, 12 insertions(+)
16
17diff --git a/setup.cfg b/setup.cfg
18index 95900ff..27da313 100644
19--- a/setup.cfg
20+++ b/setup.cfg
21@@ -9,3 +9,15 @@ addopts = -vx Tests
22
23 [flake8]
24 max-line-length = 88
25+
26+[build_ext]
27+disable-platform-guessing = 1
28+enable-zlib = 1
29+enable-jpeg = 1
30+enable-tiff = 1
31+enable-freetype = 1
32+enable-lcms = 1
33+enable-jpeg2000 = 1
34+disable-webp = 1
35+disable-webpmux = 1
36+disable-imagequant = 1
37--
382.8.1
39
diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch
new file mode 100644
index 000000000..e86293421
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow/0001-support-cross-compiling.patch
@@ -0,0 +1,61 @@
1From a78411402c824668283beb94db4bf7e206a4cf60 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 14 Mar 2019 03:48:10 -0400
4Subject: [PATCH] support cross compiling
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 setup.py | 13 +++----------
11 1 file changed, 3 insertions(+), 10 deletions(-)
12
13diff --git a/setup.py b/setup.py
14index 79f912b..37e5827 100755
15--- a/setup.py
16+++ b/setup.py
17@@ -50,7 +50,7 @@ _LIB_IMAGING = (
18 "ZipEncode", "TiffDecode", "Jpeg2KDecode", "Jpeg2KEncode", "BoxBlur",
19 "QuantPngQuant", "codec_fd")
20
21-DEBUG = False
22+DEBUG = True
23
24
25 class DependencyException(Exception):
26@@ -345,21 +345,16 @@ class pil_build_ext(build_ext):
27 _add_directory(library_dirs, match.group(1))
28
29 # include, rpath, if set as environment variables:
30- for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE'):
31+ for k in ('C_INCLUDE_PATH', 'CPATH', 'INCLUDE', 'STAGING_INCDIR'):
32 if k in os.environ:
33 for d in os.environ[k].split(os.path.pathsep):
34 _add_directory(include_dirs, d)
35
36- for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB'):
37+ for k in ('LD_RUN_PATH', 'LIBRARY_PATH', 'LIB', 'STAGING_LIBDIR'):
38 if k in os.environ:
39 for d in os.environ[k].split(os.path.pathsep):
40 _add_directory(library_dirs, d)
41
42- prefix = sysconfig.get_config_var("prefix")
43- if prefix:
44- _add_directory(library_dirs, os.path.join(prefix, "lib"))
45- _add_directory(include_dirs, os.path.join(prefix, "include"))
46-
47 #
48 # add platform directories
49
50@@ -413,8 +408,6 @@ class pil_build_ext(build_ext):
51 elif sys.platform.startswith("linux") or \
52 sys.platform.startswith("gnu") or \
53 sys.platform.startswith("freebsd"):
54- for dirname in _find_library_dirs_ldconfig():
55- _add_directory(library_dirs, dirname)
56 if sys.platform.startswith("linux") and \
57 os.environ.get('ANDROID_ROOT', None):
58 # termux support for android.
59--
602.8.1
61
diff --git a/meta-python/recipes-devtools/python/python3-pillow_5.4.1.bb b/meta-python/recipes-devtools/python/python3-pillow_5.4.1.bb
new file mode 100644
index 000000000..746c18449
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pillow_5.4.1.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Python Imaging Library (Fork). Pillow is the friendly PIL fork by Alex \
2Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and \
3Contributors."
4HOMEPAGE = "https://pillow.readthedocs.io"
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=c6379001ecb47e2a0420c40177fc1125"
7
8SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=5.4.x \
9 file://0001-support-cross-compiling.patch \
10 file://0001-explicitly-set-compile-options.patch \
11"
12SRCREV ?= "f38f01bbe3a0a9f49ce592c86ff20c01c9655133"
13
14
15inherit setuptools3
16
17DEPENDS += " \
18 zlib \
19 jpeg \
20 tiff \
21 freetype \
22 lcms \
23 openjpeg \
24"
25
26S = "${WORKDIR}/git"
27
28BBCLASSEXTEND = "native"