Skip to content

Commit da21d76

Browse files
authored
3.13.7 update (#321)
1 parent bf4a907 commit da21d76

File tree

7 files changed

+7738
-1805
lines changed

7 files changed

+7738
-1805
lines changed

.github/workflows/ci.yaml

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
XZ_VERSION: ${{ steps.extract.outputs.XZ_VERSION }}
5757

5858
steps:
59-
- uses: actions/checkout@v4.1.7
59+
- uses: actions/checkout@v5
6060

6161
- name: Extract config variables
6262
id: extract
@@ -84,18 +84,27 @@ jobs:
8484
echo "XZ_VERSION=${XZ_VERSION}" | tee -a ${GITHUB_OUTPUT}
8585
8686
build:
87-
runs-on: macOS-latest
87+
runs-on: macOS-15
8888
needs: [ config ]
8989
strategy:
9090
fail-fast: false
9191
matrix:
92-
platform: ['macOS', 'iOS', 'tvOS', 'watchOS']
92+
platform: ['macOS', 'iOS', 'tvOS', 'watchOS', 'visionOS']
9393

9494
steps:
95-
- uses: actions/[email protected]
95+
- uses: actions/checkout@v5
96+
97+
- name: Set up Xcode
98+
# GitHub recommends explicitly selecting the desired Xcode version:
99+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
100+
# This became a necessity as a result of
101+
# https://github.com/actions/runner-images/issues/12541 and
102+
# https://github.com/actions/runner-images/issues/12751.
103+
run: |
104+
sudo xcode-select --switch /Applications/Xcode_16.4.app
96105
97106
- name: Set up Python
98-
uses: actions/setup-python@v5.6.0
107+
uses: actions/setup-python@v6.0.0
99108
with:
100109
# Appending -dev ensures that we can always build the dev release.
101110
# It's a no-op for versions that have been published.
@@ -117,7 +126,7 @@ jobs:
117126

118127
briefcase-testbed:
119128
name: Briefcase testbed (${{ matrix.platform }})
120-
runs-on: macOS-latest
129+
runs-on: macOS-15
121130
needs: [ config, build ]
122131
strategy:
123132
fail-fast: false
@@ -127,20 +136,29 @@ jobs:
127136
- briefcase-run-args:
128137

129138
- platform: iOS
130-
briefcase-run-args: ' -d "iPhone SE (3rd generation)"'
139+
briefcase-run-args: ' -d "iPhone 16e::iOS 18.5"'
131140

132141
steps:
133-
- uses: actions/[email protected]
142+
- uses: actions/checkout@v5
143+
144+
- name: Set up Xcode
145+
# GitHub recommends explicitly selecting the desired Xcode version:
146+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
147+
# This became a necessity as a result of
148+
# https://github.com/actions/runner-images/issues/12541 and
149+
# https://github.com/actions/runner-images/issues/12751.
150+
run: |
151+
sudo xcode-select --switch /Applications/Xcode_16.4.app
134152
135153
- name: Get build artifact
136-
uses: actions/download-artifact@v4.3.0
154+
uses: actions/download-artifact@v5.0.0
137155
with:
138156
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
139157
path: dist
140158
merge-multiple: true
141159

142160
- name: Set up Python
143-
uses: actions/setup-python@v5.6.0
161+
uses: actions/setup-python@v6.0.0
144162
with:
145163
# Appending -dev ensures that we can always build the dev release.
146164
# It's a no-op for versions that have been published.
@@ -149,7 +167,7 @@ jobs:
149167
# It's an edge case, but when a new alpha is released, we need to use it ASAP.
150168
check-latest: true
151169

152-
- uses: actions/checkout@v4.1.7
170+
- uses: actions/checkout@v5
153171
with:
154172
repository: beeware/Python-support-testbed
155173
path: Python-support-testbed
@@ -160,31 +178,44 @@ jobs:
160178
python -m pip install git+https://github.com/beeware/briefcase.git
161179
162180
- name: Run support testbed check
163-
timeout-minutes: 10
181+
timeout-minutes: 15
164182
working-directory: Python-support-testbed
165183
run: briefcase run ${{ matrix.platform }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz\'
166184

167185
cpython-testbed:
168186
name: CPython testbed (${{ matrix.platform }})
169-
runs-on: macOS-latest
187+
runs-on: macOS-15
170188
needs: [ config, build ]
171189
strategy:
172190
fail-fast: false
173191
matrix:
174-
platform: ["iOS"]
192+
platform: ["iOS", "tvOS", "visionOS"]
193+
include:
194+
# Needed to disambiguate simulator options.
195+
- platform: "visionOS"
196+
testbed-args: '--simulator "Apple Vision Pro,arch=arm64,OS=2.5"'
175197

176198
steps:
177-
- uses: actions/checkout@v4.1.7
199+
- uses: actions/checkout@v5
178200

179201
- name: Get build artifact
180-
uses: actions/download-artifact@v4.3.0
202+
uses: actions/download-artifact@v5.0.0
181203
with:
182204
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
183205
path: dist
184206
merge-multiple: true
185207

208+
- name: Set up Xcode
209+
# GitHub recommends explicitly selecting the desired Xcode version:
210+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
211+
# This became a necessity as a result of
212+
# https://github.com/actions/runner-images/issues/12541 and
213+
# https://github.com/actions/runner-images/issues/12751.
214+
run: |
215+
sudo xcode-select --switch /Applications/Xcode_16.4.app
216+
186217
- name: Set up Python
187-
uses: actions/setup-python@v5.6.0
218+
uses: actions/setup-python@v6.0.0
188219
with:
189220
# Appending -dev ensures that we can always build the dev release.
190221
# It's a no-op for versions that have been published.
@@ -200,7 +231,7 @@ jobs:
200231
tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
201232
202233
- name: Run CPython testbed
203-
timeout-minutes: 10
234+
timeout-minutes: 15
204235
working-directory: support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
205236
run: |
206237
# Run a representative subset of CPython core tests:
@@ -209,7 +240,7 @@ jobs:
209240
# - test_os as a test of system library calls
210241
# - test_bz2 as a simple test of third party libraries
211242
# - test_ctypes as a test of FFI
212-
python -m testbed run -- test --single-process --rerun -W test_builtin test_grammar test_os test_bz2 test_ctypes
243+
python -m testbed run --verbose ${{ matrix.testbed-args }} -- test --single-process --rerun -W test_builtin test_grammar test_os test_bz2 test_ctypes
213244
214245
crossenv-test:
215246
name: Cross-platform env test (${{ matrix.multiarch }})
@@ -230,17 +261,17 @@ jobs:
230261
multiarch: arm64-iphoneos
231262

232263
steps:
233-
- uses: actions/checkout@v4.1.7
264+
- uses: actions/checkout@v5
234265

235266
- name: Get build artifact
236-
uses: actions/download-artifact@v4.3.0
267+
uses: actions/download-artifact@v5.0.0
237268
with:
238269
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
239270
path: dist
240271
merge-multiple: true
241272

242273
- name: Set up Python
243-
uses: actions/setup-python@v5.6.0
274+
uses: actions/setup-python@v6.0.0
244275
with:
245276
# Appending -dev ensures that we can always build the dev release.
246277
# It's a no-op for versions that have been published.

.github/workflows/publish.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212

1313
- name: Set up Python environment
14-
uses: actions/setup-python@v5.6.0
14+
uses: actions/setup-python@v6.0.0
1515
with:
1616
python-version: "3.X"
1717

@@ -48,3 +48,6 @@ jobs:
4848
# watchOS build
4949
curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
5050
aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/watchOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-watchOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
51+
# visionOS build
52+
curl -o visionOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ steps.build-vars.outputs.TAG }}/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz
53+
aws s3 cp visionOS-artefact.tar.gz s3://briefcase-support/python/${{ steps.build-vars.outputs.PYTHON_VER }}/visionOS/Python-${{ steps.build-vars.outputs.PYTHON_VER }}-visionOS-support.${{ steps.build-vars.outputs.BUILD_NUMBER }}.tar.gz

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
needs: [ config, ci ]
4141
steps:
4242
- name: Get build artifacts
43-
uses: actions/download-artifact@v4.3.0
43+
uses: actions/download-artifact@v5.0.0
4444
with:
4545
pattern: Python-*
4646
path: dist
4747
merge-multiple: true
4848

4949
- name: Create Release
50-
uses: ncipollo/release-action@v1.18.0
50+
uses: ncipollo/release-action@v1.20.0
5151
with:
5252
name: ${{ needs.ci.outputs.PYTHON_VER }}-${{ needs.config.outputs.BUILD_NUMBER }}
5353
tag: ${{ needs.ci.outputs.PYTHON_VER }}-${{ needs.config.outputs.BUILD_NUMBER }}

Makefile

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# - iOS - build everything for iOS
66
# - tvOS - build everything for tvOS
77
# - watchOS - build everything for watchOS
8+
# - visionOS - build everything for visionOS
89

910
# Current directory
1011
PROJECT_DIR=$(shell pwd)
@@ -18,7 +19,7 @@ BUILD_NUMBER=custom
1819
# of a release cycle, as official binaries won't be published.
1920
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
2021
# PYTHON_VER is the major/minor version (e.g., 3.10)
21-
PYTHON_VERSION=3.13.5
22+
PYTHON_VERSION=3.13.7
2223
PYTHON_PKG_VERSION=$(PYTHON_VERSION)
2324
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
2425
PYTHON_PKG_MICRO_VERSION=$(shell echo $(PYTHON_PKG_VERSION) | grep -Eo "\d+\.\d+\.\d+")
@@ -33,32 +34,37 @@ OPENSSL_VERSION=3.0.16-2
3334
XZ_VERSION=5.6.4-2
3435

3536
# Supported OS
36-
OS_LIST=macOS iOS tvOS watchOS
37+
OS_LIST=macOS iOS tvOS watchOS visionOS
3738

3839
CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar
3940

4041
# macOS targets
4142
TARGETS-macOS=macosx.x86_64 macosx.arm64
4243
TRIPLE_OS-macOS=macos
44+
PLATFORM_NAME-macOS=macOS
4345
VERSION_MIN-macOS=11.0
4446

4547
# iOS targets
4648
TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64
4749
TRIPLE_OS-iOS=ios
50+
PLATFORM_NAME-iOS=iOS
4851
VERSION_MIN-iOS=13.0
4952

5053
# tvOS targets
5154
TARGETS-tvOS=appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64
5255
TRIPLE_OS-tvOS=tvos
56+
PLATFORM_NAME-tvOS=tvOS
5357
VERSION_MIN-tvOS=12.0
5458

5559
# watchOS targets
5660
TARGETS-watchOS=watchsimulator.x86_64 watchsimulator.arm64 watchos.arm64_32
5761
TRIPLE_OS-watchOS=watchos
62+
PLATFORM_NAME-watchOS=watchOS
5863
VERSION_MIN-watchOS=4.0
5964

6065
TARGETS-visionOS=xrsimulator.arm64 xros.arm64
6166
TRIPLE_OS-visionOS=xros
67+
PLATFORM_NAME-visionOS=xrOS
6268
VERSION_MIN-visionOS=2.0
6369

6470
# The architecture of the machine doing the build
@@ -94,7 +100,7 @@ update-patch:
94100
# call
95101
if [ -z "$(PYTHON_REPO_DIR)" ]; then echo "\n\nPYTHON_REPO_DIR must be set to the root of your Python github checkout\n\n"; fi
96102
cd $(PYTHON_REPO_DIR) && \
97-
git diff -D v$(PYTHON_VERSION) $(PYTHON_VER)-patched \
103+
git diff --no-renames -D v$(PYTHON_VERSION) $(PYTHON_VER)-patched \
98104
| PATH="/usr/local/bin:/opt/homebrew/bin:$(PATH)" filterdiff \
99105
-X $(PROJECT_DIR)/patch/Python/diff.exclude -p 1 --clean \
100106
> $(PROJECT_DIR)/patch/Python/Python.patch
@@ -286,15 +292,15 @@ $$(PYTHON_SRCDIR-$(target))/configure: \
286292
# Apply target Python patches
287293
cd $$(PYTHON_SRCDIR-$(target)) && patch -p1 < $(PROJECT_DIR)/patch/Python/Python.patch
288294
# Make sure the binary scripts are executable
289-
chmod 755 $$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin/*
295+
chmod 755 $$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin/*
290296
# Touch the configure script to ensure that Make identifies it as up to date.
291297
touch $$(PYTHON_SRCDIR-$(target))/configure
292298

293299
$$(PYTHON_SRCDIR-$(target))/Makefile: \
294300
$$(PYTHON_SRCDIR-$(target))/configure
295301
# Configure target Python
296302
cd $$(PYTHON_SRCDIR-$(target)) && \
297-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
303+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
298304
./configure \
299305
LIBLZMA_CFLAGS="-I$$(XZ_INSTALL-$(target))/include" \
300306
LIBLZMA_LIBS="-L$$(XZ_INSTALL-$(target))/lib -llzma" \
@@ -316,14 +322,14 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
316322
$$(PYTHON_SRCDIR-$(target))/python.exe: $$(PYTHON_SRCDIR-$(target))/Makefile
317323
@echo ">>> Build Python for $(target)"
318324
cd $$(PYTHON_SRCDIR-$(target)) && \
319-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
325+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
320326
make -j8 all \
321327
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
322328

323329
$$(PYTHON_LIB-$(target)): $$(PYTHON_SRCDIR-$(target))/python.exe
324330
@echo ">>> Install Python for $(target)"
325331
cd $$(PYTHON_SRCDIR-$(target)) && \
326-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
332+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
327333
make install \
328334
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
329335

@@ -489,15 +495,11 @@ $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h: $$(PYTHON_LIB-$(sdk))
489495
mkdir -p $$(PYTHON_INSTALL-$(sdk))/include
490496
ln -si ../Python.framework/Headers $$(PYTHON_INSTALL-$(sdk))/include/python$(PYTHON_VER)
491497

492-
ifeq ($(os), visionOS)
493-
echo "Skipping arch-specific header copying for visionOS"
494-
else
495498
# Add the individual headers from each target in an arch-specific name
496499
$$(foreach target,$$(SDK_TARGETS-$(sdk)),cp $$(PYTHON_INCLUDE-$$(target))/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig-$$(ARCH-$$(target)).h; )
497500

498501
# Copy the cross-target header from the source folder of the first target in the $(sdk) SDK
499-
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h
500-
endif
502+
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/Apple/$(os)/Resources/pyconfig.h $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h
501503

502504

503505
$$(PYTHON_STDLIB-$(sdk))/LICENSE.TXT: $$(PYTHON_LIB-$(sdk)) $$(PYTHON_FRAMEWORK-$(sdk))/Info.plist $$(PYTHON_INCLUDE-$(sdk))/pyconfig.h $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(PYTHON_PLATFORM_SITECUSTOMIZE-$$(target)))
@@ -663,6 +665,11 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
663665
-output $$(PYTHON_XCFRAMEWORK-$(os)) $$(foreach sdk,$$(SDKS-$(os)),-framework $$(PYTHON_FRAMEWORK-$$(sdk))) \
664666
2>&1 | tee -a support/$(PYTHON_VER)/python-$(os).xcframework.log
665667

668+
@echo ">>> Install build tools for $(os)"
669+
mkdir $$(PYTHON_XCFRAMEWORK-$(os))/build
670+
cp $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed/Python.xcframework/build/utils.sh $$(PYTHON_XCFRAMEWORK-$(os))/build
671+
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
672+
666673
@echo ">>> Install PYTHONHOME for $(os)"
667674
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/include $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
668675
$$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/bin $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
@@ -671,9 +678,9 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
671678
# Disable dSYM production (for now)
672679
# $$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/Python.dSYM $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
673680

674-
ifeq ($(filter $(os),iOS visionOS),$(os))
681+
ifeq ($(filter $(os),iOS tvOS visionOS),$(os))
675682
@echo ">>> Clone testbed project for $(os)"
676-
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/$(os)/testbed clone --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
683+
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed clone --platform $(os) --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
677684
endif
678685

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

0 commit comments

Comments
 (0)