diff --git a/server/pypi/build-wheel.py b/server/pypi/build-wheel.py index 8ef56dd5bd..0b78470ea8 100755 --- a/server/pypi/build-wheel.py +++ b/server/pypi/build-wheel.py @@ -579,11 +579,6 @@ def get_common_env_vars(self, env): raise CommandError("Found no variables in android-env.sh output:\n" + build_common_output) - # Set all other variables used by distutils to prevent the host Python values (if - # any) from taking effect. - env["CPPFLAGS"] = "" - env["LDSHARED"] = f"{env['CC']} -shared" - compiler_vars = ["CC", "CXX", "LD"] if "fortran" in self.non_python_build_reqs: toolchain = self.abi if self.abi in ["x86", "x86_64"] else tool_prefix @@ -611,6 +606,11 @@ def get_common_env_vars(self, env): os.chmod(wrapper_path, 0o755) env[var] = wrapper_path + # Set all other variables used by distutils to prevent the host Python values (if + # any) from taking effect. + env["CPPFLAGS"] = "" + env["LDSHARED"] = f"{env['CC']} -shared" + def get_python_env_vars(self, env, pypi_env): # Adding host_env to PYTHONPATH allows setup.py to import requirements, for # example to call numpy.get_include(). diff --git a/server/pypi/packages/pillow/meta.yaml b/server/pypi/packages/pillow/meta.yaml index 328542639f..27913b2b30 100644 --- a/server/pypi/packages/pillow/meta.yaml +++ b/server/pypi/packages/pillow/meta.yaml @@ -1,6 +1,6 @@ package: - name: Pillow - version: "10.1.0" + name: pillow + version: "11.0.0" requirements: host: diff --git a/server/pypi/packages/pillow/patches/chaquopy.patch b/server/pypi/packages/pillow/patches/chaquopy.patch index 84d5bf8572..b70f7ce5d1 100644 --- a/server/pypi/packages/pillow/patches/chaquopy.patch +++ b/server/pypi/packages/pillow/patches/chaquopy.patch @@ -1,22 +1,24 @@ ---- src-original/setup.py 2022-07-01 13:14:51.000000000 +0000 -+++ src/setup.py 2022-10-04 22:09:03.025799341 +0000 -@@ -333,7 +333,7 @@ - ) +--- aaa/setup.py 2024-10-15 05:58:32.000000000 +0000 ++++ src/setup.py 2024-10-16 22:01:04.906473396 +0000 +@@ -355,7 +355,8 @@ + return True if value in configuration.get(option, []) else None - def initialize_options(self): -- self.disable_platform_guessing = None -+ self.disable_platform_guessing = True # Chaquopy: changed from None to True + def initialize_options(self) -> None: +- self.disable_platform_guessing = self.check_configuration( ++ # Chaquopy: always disable platform guessing. ++ self.disable_platform_guessing = True or self.check_configuration( + "platform-guessing", "disable" + ) self.add_imaging_libs = "" - build_ext.initialize_options(self) - for x in self.feature: -@@ -636,8 +637,8 @@ +@@ -685,8 +686,9 @@ if feature.want("zlib"): _dbg("Looking for zlib") - if _find_include_file(self, "zlib.h"): - if _find_library_file(self, "z"): -+ if True or _find_include_file(self, "zlib.h"): # Chaquopy: libz is always -+ if True or _find_library_file(self, "z"): # available. - feature.zlib = "z" ++ # Chaquopy: zlib is always available. ++ if True or _find_include_file(self, "zlib.h"): ++ if True or _find_library_file(self, "z"): + feature.set("zlib", "z") elif sys.platform == "win32" and _find_library_file(self, "zlib"): - feature.zlib = "zlib" # alternative name + feature.set("zlib", "zlib") # alternative name