Skip to content

Commit 63b03c2

Browse files
committed
Update patch to 3.13.7.
1 parent bf4a907 commit 63b03c2

File tree

7 files changed

+7732
-1803
lines changed

7 files changed

+7732
-1803
lines changed

.github/workflows/ci.yaml

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ on:
2929
XZ_VERSION:
3030
description: "The XZ version used for the build."
3131
value: ${{ jobs.config.outputs.XZ_VERSION }}
32+
ZSTD_VERSION:
33+
description: "The Zstandard version used for the build."
34+
value: ${{ jobs.config.outputs.ZSTD_VERSION }}
3235

3336
env:
3437
FORCE_COLOR: "1"
@@ -54,9 +57,10 @@ jobs:
5457
MPDECIMAL_VERSION: ${{ steps.extract.outputs.MPDECIMAL_VERSION }}
5558
OPENSSL_VERSION: ${{ steps.extract.outputs.OPENSSL_VERSION }}
5659
XZ_VERSION: ${{ steps.extract.outputs.XZ_VERSION }}
60+
ZSTD_VERSION: ${{ steps.extract.outputs.ZSTD_VERSION }}
5761

5862
steps:
59-
- uses: actions/checkout@v4.1.7
63+
- uses: actions/checkout@v5
6064

6165
- name: Extract config variables
6266
id: extract
@@ -68,6 +72,7 @@ jobs:
6872
MPDECIMAL_VERSION=$(make config | grep "MPDECIMAL_VERSION=" | cut -d "=" -f 2)
6973
OPENSSL_VERSION=$(make config | grep "OPENSSL_VERSION=" | cut -d "=" -f 2)
7074
XZ_VERSION=$(make config | grep "XZ_VERSION=" | cut -d "=" -f 2)
75+
ZSTD_VERSION=$(make config | grep "ZSTD_VERSION=" | cut -d "=" -f 2)
7176
if [ -z "${{ inputs.build-number }}" ]; then
7277
BUILD_NUMBER=custom
7378
else
@@ -82,20 +87,30 @@ jobs:
8287
echo "MPDECIMAL_VERSION=${MPDECIMAL_VERSION}" | tee -a ${GITHUB_OUTPUT}
8388
echo "OPENSSL_VERSION=${OPENSSL_VERSION}" | tee -a ${GITHUB_OUTPUT}
8489
echo "XZ_VERSION=${XZ_VERSION}" | tee -a ${GITHUB_OUTPUT}
90+
echo "ZSTD_VERSION=${ZSTD_VERSION}" | tee -a ${GITHUB_OUTPUT}
8591
8692
build:
87-
runs-on: macOS-latest
93+
runs-on: macOS-15
8894
needs: [ config ]
8995
strategy:
9096
fail-fast: false
9197
matrix:
92-
platform: ['macOS', 'iOS', 'tvOS', 'watchOS']
98+
platform: ['macOS', 'iOS', 'tvOS', 'watchOS', 'visionOS']
9399

94100
steps:
95-
- uses: actions/[email protected]
101+
- uses: actions/checkout@v5
102+
103+
- name: Set up Xcode
104+
# GitHub recommends explicitly selecting the desired Xcode version:
105+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
106+
# This became a necessity as a result of
107+
# https://github.com/actions/runner-images/issues/12541 and
108+
# https://github.com/actions/runner-images/issues/12751.
109+
run: |
110+
sudo xcode-select --switch /Applications/Xcode_16.4.app
96111
97112
- name: Set up Python
98-
uses: actions/setup-python@v5.6.0
113+
uses: actions/setup-python@v6.0.0
99114
with:
100115
# Appending -dev ensures that we can always build the dev release.
101116
# It's a no-op for versions that have been published.
@@ -117,7 +132,7 @@ jobs:
117132

118133
briefcase-testbed:
119134
name: Briefcase testbed (${{ matrix.platform }})
120-
runs-on: macOS-latest
135+
runs-on: macOS-15
121136
needs: [ config, build ]
122137
strategy:
123138
fail-fast: false
@@ -127,20 +142,29 @@ jobs:
127142
- briefcase-run-args:
128143

129144
- platform: iOS
130-
briefcase-run-args: ' -d "iPhone SE (3rd generation)"'
145+
briefcase-run-args: ' -d "iPhone 16e::iOS 18.5"'
131146

132147
steps:
133-
- uses: actions/[email protected]
148+
- uses: actions/checkout@v5
149+
150+
- name: Set up Xcode
151+
# GitHub recommends explicitly selecting the desired Xcode version:
152+
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
153+
# This became a necessity as a result of
154+
# https://github.com/actions/runner-images/issues/12541 and
155+
# https://github.com/actions/runner-images/issues/12751.
156+
run: |
157+
sudo xcode-select --switch /Applications/Xcode_16.4.app
134158
135159
- name: Get build artifact
136-
uses: actions/download-artifact@v4.3.0
160+
uses: actions/download-artifact@v5.0.0
137161
with:
138162
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
139163
path: dist
140164
merge-multiple: true
141165

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

152-
- uses: actions/checkout@v4.1.7
176+
- uses: actions/checkout@v5
153177
with:
154178
repository: beeware/Python-support-testbed
155179
path: Python-support-testbed
@@ -160,31 +184,35 @@ jobs:
160184
python -m pip install git+https://github.com/beeware/briefcase.git
161185
162186
- name: Run support testbed check
163-
timeout-minutes: 10
187+
timeout-minutes: 15
164188
working-directory: Python-support-testbed
165189
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\'
166190

167191
cpython-testbed:
168192
name: CPython testbed (${{ matrix.platform }})
169-
runs-on: macOS-latest
193+
runs-on: macOS-15
170194
needs: [ config, build ]
171195
strategy:
172196
fail-fast: false
173197
matrix:
174-
platform: ["iOS"]
198+
platform: ["iOS", "tvOS", "visionOS"]
199+
include:
200+
# Needed to disambiguate simulator options.
201+
- platform: "visionOS"
202+
testbed-args: '--simulator "Apple Vision Pro,arch=arm64,OS=2.5"'
175203

176204
steps:
177-
- uses: actions/checkout@v4.1.7
205+
- uses: actions/checkout@v5
178206

179207
- name: Get build artifact
180-
uses: actions/download-artifact@v4.3.0
208+
uses: actions/download-artifact@v5.0.0
181209
with:
182210
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
183211
path: dist
184212
merge-multiple: true
185213

186214
- name: Set up Python
187-
uses: actions/setup-python@v5.6.0
215+
uses: actions/setup-python@v6.0.0
188216
with:
189217
# Appending -dev ensures that we can always build the dev release.
190218
# It's a no-op for versions that have been published.
@@ -200,7 +228,7 @@ jobs:
200228
tar zxvf ../../../dist/Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
201229
202230
- name: Run CPython testbed
203-
timeout-minutes: 10
231+
timeout-minutes: 15
204232
working-directory: support/${{ needs.config.outputs.PYTHON_VER }}/${{ matrix.platform }}
205233
run: |
206234
# Run a representative subset of CPython core tests:
@@ -209,7 +237,7 @@ jobs:
209237
# - test_os as a test of system library calls
210238
# - test_bz2 as a simple test of third party libraries
211239
# - 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
240+
python -m testbed run --verbose ${{ matrix.testbed-args }} -- test --single-process --rerun -W test_builtin test_grammar test_os test_bz2 test_ctypes
213241
214242
crossenv-test:
215243
name: Cross-platform env test (${{ matrix.multiarch }})
@@ -230,17 +258,17 @@ jobs:
230258
multiarch: arm64-iphoneos
231259

232260
steps:
233-
- uses: actions/checkout@v4.1.7
261+
- uses: actions/checkout@v5
234262

235263
- name: Get build artifact
236-
uses: actions/download-artifact@v4.3.0
264+
uses: actions/download-artifact@v5.0.0
237265
with:
238266
pattern: Python-${{ needs.config.outputs.PYTHON_VER }}-${{ matrix.platform }}-support.${{ needs.config.outputs.BUILD_NUMBER }}.tar.gz
239267
path: dist
240268
merge-multiple: true
241269

242270
- name: Set up Python
243-
uses: actions/setup-python@v5.6.0
271+
uses: actions/setup-python@v6.0.0
244272
with:
245273
# Appending -dev ensures that we can always build the dev release.
246274
# 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)