-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from beeware/pillow-11
Update recipe for Pillow 11.0.0.
- Loading branch information
Showing
5 changed files
with
84 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,18 +31,12 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] | ||
runs-on: [ "macos-latest", "macos-12" ] | ||
runs-on: [ "macos-latest" ] | ||
|
||
exclude: | ||
# Don't need to run x86 tests on every Python version | ||
- python-version: "3.9" | ||
runs-on: "macos-12" | ||
- python-version: "3.10" | ||
runs-on: "macos-12" | ||
- python-version: "3.11" | ||
runs-on: "macos-12" | ||
- python-version: "3.13" | ||
runs-on: "macos-12" | ||
runs-on: "macos-13" | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -53,8 +47,8 @@ jobs: | |
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
# -dev suffix is a no-op for published releases | ||
python-version: ${{ matrix.python-version }}-dev | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
|
||
# Initial call to the setup script sets up the environment | ||
- name: Set up Forge | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Common subdirectories: pillow-10.4.0-orig/Tests and pillow-10.4.0/Tests | ||
Common subdirectories: pillow-10.4.0-orig/_custom_build and pillow-10.4.0/_custom_build | ||
Common subdirectories: pillow-10.4.0-orig/depends and pillow-10.4.0/depends | ||
Common subdirectories: pillow-10.4.0-orig/docs and pillow-10.4.0/docs | ||
diff -u pillow-10.4.0-orig/setup.py pillow-10.4.0/setup.py | ||
--- pillow-10.4.0-orig/setup.py 2024-06-30 23:02:01 | ||
+++ pillow-10.4.0/setup.py 2024-09-25 11:15:21 | ||
@@ -422,10 +422,22 @@ | ||
self.extensions.remove(extension) | ||
break | ||
|
||
- def get_macos_sdk_path(self): | ||
+ def get_apple_sdk_path(self): | ||
try: | ||
+ sdk = { | ||
+ ("ios", False): ["--sdk", "iphoneos"], | ||
+ ("ios", True): ["--sdk", "iphonesimulator"], | ||
+ ("tvos", False): ["--sdk", "appletvos"], | ||
+ ("tvos", True): ["--sdk", "appletvsimulator"], | ||
+ ("watchos", False): ["--sdk", "watchos"], | ||
+ ("watchos", True): ["--sdk", "watchsimulator"], | ||
+ ("darwin", False): [], | ||
+ }[ | ||
+ sys.platform, | ||
+ getattr(sys.implementation, "_multiarch", "").endswith("simulator"), | ||
+ ] | ||
sdk_path = ( | ||
- subprocess.check_output(["xcrun", "--show-sdk-path"]) | ||
+ subprocess.check_output(["xcrun", "--show-sdk-path"] + sdk) | ||
.strip() | ||
.decode("latin1") | ||
) | ||
@@ -580,13 +592,18 @@ | ||
_add_directory(library_dirs, "/usr/X11/lib") | ||
_add_directory(include_dirs, "/usr/X11/include") | ||
|
||
- sdk_path = self.get_macos_sdk_path() | ||
+ sdk_path = self.get_apple_sdk_path() | ||
if sdk_path: | ||
_add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib")) | ||
_add_directory(include_dirs, os.path.join(sdk_path, "usr", "include")) | ||
|
||
for extension in self.extensions: | ||
extension.extra_compile_args = ["-Wno-nullability-completeness"] | ||
+ elif sys.platform in {"ios", "tvos", "watchos"}: | ||
+ sdk_path = self.get_apple_sdk_path() | ||
+ if sdk_path: | ||
+ _add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib")) | ||
+ _add_directory(include_dirs, os.path.join(sdk_path, "usr", "include")) | ||
elif ( | ||
sys.platform.startswith("linux") | ||
or sys.platform.startswith("gnu") | ||
@@ -618,7 +635,10 @@ | ||
# FIXME: check /opt/stuff directories here? | ||
|
||
# standard locations | ||
- if not self.disable_platform_guessing: | ||
+ # The standard locations aren't standard on iOS et al. | ||
+ if not ( | ||
+ self.disable_platform_guessing or sys.platform in {"ios", "tvos", "watchos"} | ||
+ ): | ||
_add_directory(library_dirs, "/usr/local/lib") | ||
_add_directory(include_dirs, "/usr/local/include") | ||
|
||
Common subdirectories: pillow-10.4.0-orig/src and pillow-10.4.0/src | ||
Common subdirectories: pillow-10.4.0-orig/winbuild and pillow-10.4.0/winbuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters