Skip to content

Commit

Permalink
Working on Python 3.13: pillow
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Oct 16, 2024
1 parent 140e582 commit 38ff503
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
10 changes: 5 additions & 5 deletions server/pypi/build-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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().
Expand Down
4 changes: 2 additions & 2 deletions server/pypi/packages/pillow/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: Pillow
version: "10.1.0"
name: pillow
version: "11.0.0"

requirements:
host:
Expand Down
30 changes: 16 additions & 14 deletions server/pypi/packages/pillow/patches/chaquopy.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 38ff503

Please sign in to comment.