Skip to content

Commit 05613ab

Browse files
authored
[3.11] Add watchOS CI. (#377)
1 parent 273ffc7 commit 05613ab

4 files changed

Lines changed: 9574 additions & 8985 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ jobs:
140140
fail-fast: false
141141
matrix:
142142
platform: ["macOS", "iOS"]
143-
include:
144-
- briefcase-run-args:
145-
146-
- platform: iOS
147-
briefcase-run-args: ' -d "iPhone 17e::iOS 26.5"'
148143

149144
steps:
150145
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -186,7 +181,7 @@ jobs:
186181
PYTHON_VER: ${{ needs.config.outputs.PYTHON_VER }}
187182
BUILD_NUMBER: ${{ needs.config.outputs.BUILD_NUMBER }}
188183
run: |
189-
briefcase run ${{ matrix.platform }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${PYTHON_VER}-${{ matrix.platform }}-support.${BUILD_NUMBER}.tar.gz\'
184+
briefcase run ${{ matrix.platform }} Xcode --test -C support_package=\'../dist/Python-${PYTHON_VER}-${{ matrix.platform }}-support.${BUILD_NUMBER}.tar.gz\'
190185
191186
cpython-testbed:
192187
name: CPython testbed (${{ matrix.platform }})
@@ -195,10 +190,7 @@ jobs:
195190
strategy:
196191
fail-fast: false
197192
matrix:
198-
platform: ["iOS", "tvOS"]
199-
include:
200-
- platform: "iOS"
201-
testbed-args: '--simulator "iPhone 17e,arch=arm64,OS=26.5"'
193+
platform: ["iOS", "tvOS", "watchOS"]
202194

203195
steps:
204196
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

‎Makefile‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ $$(PYTHON_SRCDIR-$(target))/configure: \
286286
# Apply target Python patches
287287
cd $$(PYTHON_SRCDIR-$(target)) && patch -p1 < $(PROJECT_DIR)/patch/Python/Python.patch
288288
# Make sure the binary scripts are executable
289-
chmod 755 $$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin/*
289+
chmod 755 $$(PYTHON_SRCDIR-$(target))/Platforms/Apple/$(os)/Resources/bin/*
290290
# Touch the configure script to ensure that Make identifies it as up to date.
291291
touch $$(PYTHON_SRCDIR-$(target))/configure
292292

293293
$$(PYTHON_SRCDIR-$(target))/Makefile: \
294294
$$(PYTHON_SRCDIR-$(target))/configure
295295
# Configure target Python
296296
cd $$(PYTHON_SRCDIR-$(target)) && \
297-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
297+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Platforms/Apple/$(os)/Resources/bin:$(PATH)" \
298298
./configure \
299299
LIBLZMA_CFLAGS="-I$$(XZ_INSTALL-$(target))/include" \
300300
LIBLZMA_LIBS="-L$$(XZ_INSTALL-$(target))/lib -llzma" \
@@ -316,14 +316,14 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
316316
$$(PYTHON_SRCDIR-$(target))/python.exe: $$(PYTHON_SRCDIR-$(target))/Makefile
317317
@echo ">>> Build Python for $(target)"
318318
cd $$(PYTHON_SRCDIR-$(target)) && \
319-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
319+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Platforms/Apple/$(os)/Resources/bin:$(PATH)" \
320320
make all \
321321
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
322322

323323
$$(PYTHON_LIB-$(target)): $$(PYTHON_SRCDIR-$(target))/python.exe
324324
@echo ">>> Install Python for $(target)"
325325
cd $$(PYTHON_SRCDIR-$(target)) && \
326-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
326+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Platforms/Apple/$(os)/Resources/bin:$(PATH)" \
327327
make install \
328328
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
329329

@@ -489,7 +489,7 @@ $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h: $$(PYTHON_LIB-$(sdk))
489489
$$(foreach target,$$(SDK_TARGETS-$(sdk)),cp $$(PYTHON_INCLUDE-$$(target))/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig-$$(ARCH-$$(target)).h; )
490490

491491
# Copy the cross-target header from the source folder of the first target in the $(sdk) SDK
492-
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/Apple/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h
492+
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/Platforms/Apple/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h
493493

494494

495495
$$(PYTHON_PLATFORM_CONFIG-$(sdk))/sitecustomize.py: $$(PYTHON_LIB-$(sdk)) $$(PYTHON_FRAMEWORK-$(sdk))/Info.plist $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(PYTHON_PLATFORM_SITECUSTOMIZE-$$(target)))
@@ -648,8 +648,8 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
648648

649649
@echo ">>> Install build tools for $(os)"
650650
mkdir $$(PYTHON_XCFRAMEWORK-$(os))/build
651-
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed/Python.xcframework/build/utils.sh $$(PYTHON_XCFRAMEWORK-$(os))/build
652-
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed/Python.xcframework/build/$$(PLATFORM_NAME-$(os))-dylib-Info-template.plist $$(PYTHON_XCFRAMEWORK-$(os))/build
651+
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Platforms/Apple/testbed/Python.xcframework/build/utils.sh $$(PYTHON_XCFRAMEWORK-$(os))/build
652+
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Platforms/Apple/testbed/Python.xcframework/build/$$(PLATFORM_NAME-$(os))-dylib-Info-template.plist $$(PYTHON_XCFRAMEWORK-$(os))/build
653653

654654
@echo ">>> Install stdlib for $(os)"
655655
mkdir -p $$(PYTHON_XCFRAMEWORK-$(os))/lib
@@ -670,9 +670,9 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
670670
# Create symlink for dylib
671671
$$(foreach sdk,$$(SDKS-$(os)),ln -si ../Python.framework/Python $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk))/lib/libpython$(PYTHON_VER).dylib; )
672672

673-
ifeq ($(filter $(os),iOS tvOS),$(os))
673+
ifeq ($(filter $(os),iOS tvOS watchOS),$(os))
674674
@echo ">>> Clone testbed project for $(os)"
675-
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed clone --platform $(os) --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
675+
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Platforms/Apple/testbed clone --platform $(os) --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
676676
endif
677677

678678
@echo ">>> Create VERSIONS file for $(os)"

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This is a meta-package for building a version of Python that can be embedded int
88
- [Python 3.13](https://github.com/beeware/Python-Apple-support/tree/3.13)
99
- [Python 3.14](https://github.com/beeware/Python-Apple-support/tree/3.14)
1010
- [Python 3.15](https://github.com/beeware/Python-Apple-support/tree/3.15)
11+
- [Python 3.16](https://github.com/beeware/Python-Apple-support/tree/3.16)
1112

1213
It works by downloading, patching, and building a fat binary of Python and selected pre-requisites, and packaging them as frameworks that can be incorporated into an Xcode project. The binary modules in the Python standard library are distributed as binaries that can be dynamically loaded at runtime.
1314

@@ -35,7 +36,7 @@ The binaries support x86_64 and arm64 for macOS; arm64 for iOS and appleTV devic
3536
- tvOS 12.0 or later, on:
3637
- Apple TV (4th gen or later)
3738

38-
- watchOS 4.0 or later, on:
39+
- watchOS 9.0 or later, on:
3940
- Apple Watch (4th gen or later)
4041

4142
- visionOS 2.0 or later, on:

0 commit comments

Comments
 (0)