Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 1 | From ae7c8d0336381dd4c10e809e9c8926f9deeafeb8 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Thu, 14 Mar 2019 03:48:10 -0400 |
| 4 | Subject: [PATCH] support cross compiling |
| 5 | |
| 6 | Upstream-Status: Inappropriate [oe specific] |
| 7 | |
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 9 | --- |
| 10 | setup.py | 13 +++---------- |
| 11 | 1 file changed, 3 insertions(+), 10 deletions(-) |
| 12 | |
| 13 | diff --git a/setup.py b/setup.py |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 14 | index 5ceae344..07863340 100755 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | --- a/setup.py |
| 16 | +++ b/setup.py |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 17 | @@ -105,7 +105,7 @@ _LIB_IMAGING = ( |
| 18 | "codec_fd", |
| 19 | ) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | |
| 21 | -DEBUG = False |
| 22 | +DEBUG = True |
| 23 | |
| 24 | |
| 25 | class DependencyException(Exception): |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 26 | @@ -396,21 +396,16 @@ class pil_build_ext(build_ext): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | _add_directory(library_dirs, match.group(1)) |
| 28 | |
| 29 | # include, rpath, if set as environment variables: |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 30 | - for k in ("C_INCLUDE_PATH", "CPATH", "INCLUDE"): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 36 | - for k in ("LD_RUN_PATH", "LIBRARY_PATH", "LIB"): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 50 | @@ -469,8 +464,6 @@ class pil_build_ext(build_ext): |
| 51 | or sys.platform.startswith("gnu") |
| 52 | or sys.platform.startswith("freebsd") |
| 53 | ): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | - for dirname in _find_library_dirs_ldconfig(): |
| 55 | - _add_directory(library_dirs, dirname) |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 56 | if sys.platform.startswith("linux") and os.environ.get( |
| 57 | "ANDROID_ROOT", None |
| 58 | ): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 59 | -- |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 60 | 2.20.1 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 61 | |