|
| 1 | +--- a/setup.py |
| 2 | ++++ b/setup.py |
| 3 | +@@ -515,8 +515,8 @@ |
| 4 | + for d in os.environ[k].split(os.path.pathsep): |
| 5 | + _add_directory(library_dirs, d) |
| 6 | + |
| 7 | +- _add_directory(library_dirs, os.path.join(sys.prefix, "lib")) |
| 8 | +- _add_directory(include_dirs, os.path.join(sys.prefix, "include")) |
| 9 | ++ _add_directory(library_dirs, os.path.join("@TERMUX_PREFIX@", "lib")) |
| 10 | ++ _add_directory(include_dirs, os.path.join("@TERMUX_PREFIX@", "include")) |
| 11 | + |
| 12 | + # |
| 13 | + # add platform directories |
| 14 | +@@ -589,7 +589,7 @@ |
| 15 | + or sys.platform.startswith("gnu") |
| 16 | + or sys.platform.startswith("freebsd") |
| 17 | + ): |
| 18 | +- for dirname in _find_library_dirs_ldconfig(): |
| 19 | ++ for dirname in []: |
| 20 | + _add_directory(library_dirs, dirname) |
| 21 | + if sys.platform.startswith("linux") and os.environ.get("ANDROID_ROOT"): |
| 22 | + # termux support for android. |
| 23 | +@@ -615,7 +615,7 @@ |
| 24 | + # FIXME: check /opt/stuff directories here? |
| 25 | + |
| 26 | + # standard locations |
| 27 | +- if not self.disable_platform_guessing: |
| 28 | ++ if False: |
| 29 | + _add_directory(library_dirs, "/usr/local/lib") |
| 30 | + _add_directory(include_dirs, "/usr/local/include") |
| 31 | + |
| 32 | +@@ -990,12 +990,12 @@ |
| 33 | + for src_file in _LIB_IMAGING: |
| 34 | + files.append(os.path.join("src/libImaging", src_file + ".c")) |
| 35 | + ext_modules = [ |
| 36 | +- Extension("PIL._imaging", files), |
| 37 | ++ Extension("PIL._imaging", files, extra_link_args=["-lm"]), |
| 38 | +- Extension("PIL._imagingft", ["src/_imagingft.c"]), |
| 39 | ++ Extension("PIL._imagingft", ["src/_imagingft.c"], extra_link_args=["-lm"]), |
| 40 | + Extension("PIL._imagingcms", ["src/_imagingcms.c"]), |
| 41 | + Extension("PIL._webp", ["src/_webp.c"]), |
| 42 | + Extension("PIL._imagingtk", ["src/_imagingtk.c", "src/Tk/tkImaging.c"]), |
| 43 | +- Extension("PIL._imagingmath", ["src/_imagingmath.c"]), |
| 44 | ++ Extension("PIL._imagingmath", ["src/_imagingmath.c"], extra_link_args=["-lm"]), |
| 45 | + Extension("PIL._imagingmorph", ["src/_imagingmorph.c"]), |
| 46 | + ] |
| 47 | + |
0 commit comments