Skip to content

Commit 81a5aa9

Browse files
committed
Bump to Python 3.14.0rc3.
1 parent 26982d8 commit 81a5aa9

File tree

3 files changed

+6821
-2876
lines changed

3 files changed

+6821
-2876
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 6 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,6 +57,7 @@ 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:
5963
- uses: actions/checkout@v5
@@ -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,6 +87,7 @@ 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:
8793
runs-on: macOS-15
@@ -184,16 +190,12 @@ jobs:
184190

185191
cpython-testbed:
186192
name: CPython testbed (${{ matrix.platform }})
187-
# For now, CPython testbed can't run on macos-15: https://github.com/actions/runner-images/issues/12777
188-
runs-on: macOS-14
193+
runs-on: macOS-15
189194
needs: [ config, build ]
190195
strategy:
191196
fail-fast: false
192197
matrix:
193-
platform: ["iOS", "visionOS"]
194-
include:
195-
- platform: "iOS"
196-
testbed-args: '--simulator "iPhone 16e,arch=arm64,OS=18.5"'
198+
platform: ["iOS", "tvOS", "visionOS"]
197199

198200
steps:
199201
- uses: actions/checkout@v5

Makefile

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BUILD_NUMBER=custom
1919
# of a release cycle, as official binaries won't be published.
2020
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
2121
# PYTHON_VER is the major/minor version (e.g., 3.10)
22-
PYTHON_VERSION=3.14.0rc1
22+
PYTHON_VERSION=3.14.0rc3
2323
PYTHON_PKG_VERSION=$(PYTHON_VERSION)
2424
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Eo "\d+\.\d+\.\d+")
2525
PYTHON_PKG_MICRO_VERSION=$(shell echo $(PYTHON_PKG_VERSION) | grep -Eo "\d+\.\d+\.\d+")
@@ -32,6 +32,7 @@ LIBFFI_VERSION=3.4.7-2
3232
MPDECIMAL_VERSION=4.0.0-2
3333
OPENSSL_VERSION=3.0.16-2
3434
XZ_VERSION=5.6.4-2
35+
ZSTD_VERSION=1.5.7-1
3536

3637
# Supported OS
3738
OS_LIST=macOS iOS tvOS watchOS visionOS
@@ -95,7 +96,7 @@ update-patch:
9596
# call
9697
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
9798
cd $(PYTHON_REPO_DIR) && \
98-
git diff -D v$(PYTHON_VERSION) $(PYTHON_VER)-patched \
99+
git diff --no-renames -D v$(PYTHON_VERSION) $(PYTHON_VER)-patched \
99100
| PATH="/usr/local/bin:/opt/homebrew/bin:$(PATH)" filterdiff \
100101
-X $(PROJECT_DIR)/patch/Python/diff.exclude -p 1 --clean \
101102
> $(PROJECT_DIR)/patch/Python/Python.patch
@@ -187,6 +188,26 @@ $$(XZ_LIB-$(target)): downloads/xz-$(XZ_VERSION)-$(target).tar.gz
187188
# Ensure the target is marked as clean.
188189
touch $$(XZ_LIB-$(target))
189190

191+
###########################################################################
192+
# Target: zstd (ZStandard)
193+
###########################################################################
194+
195+
ZSTD_INSTALL-$(target)=$(PROJECT_DIR)/install/$(os)/$(target)/zstd-$(ZSTD_VERSION)
196+
ZSTD_LIB-$(target)=$$(ZSTD_INSTALL-$(target))/lib/libzstd.a
197+
198+
downloads/zstd-$(ZSTD_VERSION)-$(target).tar.gz:
199+
@echo ">>> Download zstd for $(target)"
200+
mkdir -p downloads
201+
curl $(CURL_FLAGS) -o $$@ \
202+
https://github.com/beeware/cpython-apple-source-deps/releases/download/zstd-$(ZSTD_VERSION)/zstd-$(ZSTD_VERSION)-$(target).tar.gz
203+
204+
$$(ZSTD_LIB-$(target)): downloads/zstd-$(ZSTD_VERSION)-$(target).tar.gz
205+
@echo ">>> Install zstd for $(target)"
206+
mkdir -p $$(ZSTD_INSTALL-$(target))
207+
cd $$(ZSTD_INSTALL-$(target)) && tar zxvf $(PROJECT_DIR)/downloads/zstd-$(ZSTD_VERSION)-$(target).tar.gz --exclude="*.dylib"
208+
# Ensure the target is marked as clean.
209+
touch $$(ZSTD_LIB-$(target))
210+
190211
###########################################################################
191212
# Target: mpdecimal
192213
###########################################################################
@@ -280,22 +301,23 @@ $$(PYTHON_SRCDIR-$(target))/configure: \
280301
$$(LIBFFI_LIB-$(target)) \
281302
$$(MPDECIMAL_LIB-$(target)) \
282303
$$(OPENSSL_SSL_LIB-$(target)) \
283-
$$(XZ_LIB-$(target))
304+
$$(XZ_LIB-$(target)) \
305+
$$(ZSTD_LIB-$(target))
284306
@echo ">>> Unpack and configure Python for $(target)"
285307
mkdir -p $$(PYTHON_SRCDIR-$(target))
286308
tar zxf downloads/Python-$(PYTHON_VERSION).tar.gz --strip-components 1 -C $$(PYTHON_SRCDIR-$(target))
287309
# Apply target Python patches
288310
cd $$(PYTHON_SRCDIR-$(target)) && patch -p1 < $(PROJECT_DIR)/patch/Python/Python.patch
289311
# Make sure the binary scripts are executable
290-
chmod 755 $$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin/*
312+
chmod 755 $$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin/*
291313
# Touch the configure script to ensure that Make identifies it as up to date.
292314
touch $$(PYTHON_SRCDIR-$(target))/configure
293315

294316
$$(PYTHON_SRCDIR-$(target))/Makefile: \
295317
$$(PYTHON_SRCDIR-$(target))/configure
296318
# Configure target Python
297319
cd $$(PYTHON_SRCDIR-$(target)) && \
298-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
320+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
299321
./configure \
300322
LIBLZMA_CFLAGS="-I$$(XZ_INSTALL-$(target))/include" \
301323
LIBLZMA_LIBS="-L$$(XZ_INSTALL-$(target))/lib -llzma" \
@@ -305,6 +327,8 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
305327
LIBMPDEC_LIBS="-L$$(MPDECIMAL_INSTALL-$(target))/lib -lmpdec" \
306328
LIBFFI_CFLAGS="-I$$(LIBFFI_INSTALL-$(target))/include" \
307329
LIBFFI_LIBS="-L$$(LIBFFI_INSTALL-$(target))/lib -lffi" \
330+
LIBZSTD_CFLAGS="-I$$(ZSTD_INSTALL-$(target))/include" \
331+
LIBZSTD_LIBS="-L$$(ZSTD_INSTALL-$(target))/lib -lzstd" \
308332
--host=$$(TARGET_TRIPLE-$(target)) \
309333
--build=$(HOST_ARCH)-apple-darwin \
310334
--with-build-python=$(HOST_PYTHON) \
@@ -317,14 +341,14 @@ $$(PYTHON_SRCDIR-$(target))/Makefile: \
317341
$$(PYTHON_SRCDIR-$(target))/python.exe: $$(PYTHON_SRCDIR-$(target))/Makefile
318342
@echo ">>> Build Python for $(target)"
319343
cd $$(PYTHON_SRCDIR-$(target)) && \
320-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
344+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
321345
make -j8 all \
322346
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
323347

324348
$$(PYTHON_LIB-$(target)): $$(PYTHON_SRCDIR-$(target))/python.exe
325349
@echo ">>> Install Python for $(target)"
326350
cd $$(PYTHON_SRCDIR-$(target)) && \
327-
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/$(os)/Resources/bin:$(PATH)" \
351+
PATH="$(PROJECT_DIR)/$$(PYTHON_SRCDIR-$(target))/Apple/$(os)/Resources/bin:$(PATH)" \
328352
make install \
329353
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
330354

@@ -674,9 +698,9 @@ $$(PYTHON_XCFRAMEWORK-$(os))/Info.plist: \
674698
# Disable dSYM production (for now)
675699
# $$(foreach sdk,$$(SDKS-$(os)),cp -r $$(PYTHON_INSTALL-$$(sdk))/Python.dSYM $$(PYTHON_XCFRAMEWORK-$(os))/$$(SDK_SLICE-$$(sdk)); )
676700

677-
ifeq ($(filter $(os),iOS visionOS),$(os))
701+
ifeq ($(filter $(os),iOS tvOS visionOS),$(os))
678702
@echo ">>> Clone testbed project for $(os)"
679-
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/$(os)/testbed clone --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
703+
$(HOST_PYTHON) $$(PYTHON_SRCDIR-$$(firstword $$(SDK_TARGETS-$$(firstword $$(SDKS-$(os))))))/Apple/testbed clone --platform $(os) --framework $$(PYTHON_XCFRAMEWORK-$(os)) support/$(PYTHON_VER)/$(os)/testbed
680704
endif
681705

682706
@echo ">>> Create VERSIONS file for $(os)"
@@ -689,6 +713,7 @@ endif
689713
echo "mpdecimal: $(MPDECIMAL_VERSION)" >> support/$(PYTHON_VER)/$(os)/VERSIONS
690714
echo "OpenSSL: $(OPENSSL_VERSION)" >> support/$(PYTHON_VER)/$(os)/VERSIONS
691715
echo "XZ: $(XZ_VERSION)" >> support/$(PYTHON_VER)/$(os)/VERSIONS
716+
echo "Zstandard: $(ZSTD_VERSION)" >> support/$(PYTHON_VER)/$(os)/VERSIONS
692717

693718
dist/Python-$(PYTHON_VER)-$(os)-support.$(BUILD_NUMBER).tar.gz: \
694719
$$(PYTHON_XCFRAMEWORK-$(os))/Info.plist \
@@ -757,6 +782,7 @@ config:
757782
@echo "MPDECIMAL_VERSION=$(MPDECIMAL_VERSION)"
758783
@echo "OPENSSL_VERSION=$(OPENSSL_VERSION)"
759784
@echo "XZ_VERSION=$(XZ_VERSION)"
785+
@echo "ZSTD_VERSION=$(ZSTD_VERSION)"
760786

761787
# Expand cross-platform build and clean targets for each output product
762788
clean: $(foreach os,$(OS_LIST),clean-$(os))

0 commit comments

Comments
 (0)