Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a186551
Add regression tests for MemoryDenyWriteExecute=true (#1071)
geofft Apr 16, 2026
7c9f6cf
Run a smaller subset of targets on pull requests by default (#1075)
zanieb Apr 23, 2026
8887794
Bump pip from 26.0.1 -> 26.1 (#1109)
mmangkad Apr 27, 2026
90a9247
statically link libpython on macOS (#1105)
jjhelmus Apr 28, 2026
7baf76f
remove tcl/tk translations and demo files from distributions (#1104)
jjhelmus Apr 29, 2026
a21e242
Fix expansion of ci targets when labels are outside the default set (…
zanieb Apr 30, 2026
b8a0627
Force patchelf to use 64KB page size on loongarch64 (#1107)
wojiushixiaobai May 1, 2026
f6ed9c1
Bump 3.14 to 3.14.5rc1 (#1119)
zanieb May 2, 2026
20f6240
Update the target for 3.14rc1 (#1120)
zanieb May 4, 2026
1e42e61
Bump pip from 26.1 -> 26.1.1 (#1121)
mmangkad May 6, 2026
6888ae4
CPython 3.15.0a8 -> 3.15.0b1 (#1123)
jjhelmus May 8, 2026
f0ae464
Bump 3.14 to 3.14.5 (#1125)
jjhelmus May 10, 2026
96a589a
cross compile riscv64 with LLVM toolchain and sysroot (#1116)
jjhelmus May 11, 2026
6905b66
Build OpenSSL with no-uplink for Python 3.12+ (#1132)
jjhelmus May 21, 2026
f276b10
include missing vm_sockets.h for socket.AF_VSOCK (#1133)
jjhelmus May 22, 2026
79a5e9a
Bump pip from 26.1.1 -> 26.1.2 (#1135)
mmangkad Jun 2, 2026
545a2e2
Bump 3.15.0 version (#1136)
jjhelmus Jun 2, 2026
9150a58
sqlite 3.50.4 -> 3.53.1 (#1137)
jjhelmus Jun 2, 2026
7eaec0d
expat 2.6.3 -> 2.8.1 (#1143)
jjhelmus Jun 9, 2026
36488ea
Bump OpenSSL 3.5.6 -> 3.5.7 (#1144)
geofft Jun 10, 2026
97d71a8
Bump Python 3.13 and 3.14 (#1146)
jjhelmus Jun 10, 2026
a6b8a1c
Cherry-pick an improved DER parser in _ssl.c from 3.12 onto 3.10 and …
geofft Jun 10, 2026
5fc3223
weakref is not included in test[limited]api in 3.15 (#1151)
jjhelmus Jun 11, 2026
f1d7b92
Revert "cross compile riscv64 with LLVM toolchain and sysroot (#1116)…
jjhelmus Jun 11, 2026
3156c6d
safely remove PYTHON* env variables in distribution tests (#1152)
jjhelmus Jun 12, 2026
c66693b
remove unused readline download (#1154)
jjhelmus Jun 12, 2026
480a986
update zlib 1.3.1 -> 1.3.2 (#1153)
jjhelmus Jun 12, 2026
273bbe4
zlib: disable vectorized crc32 on s390x (#1155)
jjhelmus Jun 12, 2026
5a0197e
xz 5.8.1 -> 5.8.3 (#1156)
jjhelmus Jun 13, 2026
e8d8c8b
update X.org dependencies (#1157)
jjhelmus Jun 16, 2026
9af2aa1
remove deprecated build-{linux,macos,windows}.py scripts (#1029)
jjhelmus Jun 18, 2026
2263066
Retain embedded ZipFS data in Tcl/Tk DLLs on Windows (#1161)
jjhelmus Jun 23, 2026
7f93a7d
CPython 3.15.0b3 (#1162)
jjhelmus Jun 23, 2026
e2b34ae
Build CPython against modern kernel UAPI headers on *-linux-gnu targe…
jjhelmus Jul 6, 2026
4704106
Add performance conscious hardening flags to linux targets (#1166)
jjhelmus Jul 9, 2026
5f7c2d5
Validate that distributions include stack protection and fortify sour…
jjhelmus Jul 10, 2026
1b9d44f
add a script to find and apply package updates (#1159)
jjhelmus Jul 10, 2026
89de021
Enable os.memfd_create through runtime weak linking (#1164)
jjhelmus Jul 10, 2026
2ff9048
Configure BOLT behavior through BOLT_{COMMON,APPLY}_FLAGS (#1178)
jjhelmus Jul 14, 2026
0e4d9c2
CPython 3.15.0b4 (#1181)
jjhelmus Jul 18, 2026
3d86095
Update to expat 2.8.2 (#1182)
jjhelmus Jul 21, 2026
dd3980d
Enable os.getrandom with modern Linux UAPI headers (#1183)
jjhelmus Jul 22, 2026
99fa028
Enable os.copy_file_range via a weak symbol (#1184)
jjhelmus Jul 22, 2026
59abeee
Skip BOLT optimization for HACL hash compressors (#1187)
zanieb Jul 22, 2026
c1991f8
unix: support building Linux x86-64 from macOS aarch64 (#1179)
jjhelmus Jul 23, 2026
2f8dee5
Bump pip from 26.1.2 -> 26.2 (#1197)
mmangkad Jul 30, 2026
82161d6
CPython 3.15.0rc1 (#1199)
jjhelmus Aug 4, 2026
b1507be
Tcl/Tk 9.0.4 on Windows (#1201)
jjhelmus Aug 4, 2026
0e3f484
Tcl/Tk 9.0.4 on Linux and macOS (#1202)
jjhelmus Aug 4, 2026
51c6f33
Use Namespace runners for macOS builds (#1204)
zanieb Aug 5, 2026
cd9bead
Use a sparse checkout of the macOS SDKs (#1205)
jjhelmus Aug 5, 2026
76b4124
CPython 3.14.7 (#1206)
jjhelmus Aug 5, 2026
9cf393d
Cpython 3.13.15 (#1208)
jjhelmus Aug 6, 2026
5ae4c6f
Bump pip from 26.2 -> 26.2.1 (#1209)
mmangkad Aug 6, 2026
00c8a06
empty commit to trigger CI run (#1210)
jjhelmus Aug 7, 2026
9a8332b
select correct musl toolchain for static build (#1212)
jjhelmus Aug 11, 2026
f565230
Enable static builds for the aarch64-linux-musl target (#1213)
jjhelmus Aug 11, 2026
1661804
Use raw syscalls for copy_file_range() and memfd_create() (#1216)
daandemeyer Aug 13, 2026
cf85e58
skip llvm-strip on signed DLLs (#1217)
ethernet8023 Aug 13, 2026
672b2ea
expat 2.8.3 (#1219)
jjhelmus Aug 14, 2026
38d35dc
Update CPython 3.10, 3.11 and 3.12 (#1218)
jjhelmus Aug 14, 2026
7ca7ec7
Require wheels for Python dependencies (#1221)
zaniebot Aug 18, 2026
b25f9d7
Use the versions bot's ruleset bypass when merging (#1223)
ewdurbin Aug 19, 2026
5b84e8e
Use standard extension configuration for CPython 3.12+ (#1180)
jjhelmus Aug 20, 2026
6f7cee6
disable _testclinic in all Python versions (#1225)
jjhelmus Aug 20, 2026
f9fe5c8
Update to libffi 3.4.8 (#1226)
jjhelmus Aug 20, 2026
976bd2d
Use the same libffi version for musl builds (#1227)
jjhelmus Aug 20, 2026
8a0c6df
Add information about pbs performance (#1192)
jjhelmus Aug 21, 2026
9417e4e
Emit GNU build IDs on Linux targets (#1230)
patryk4815 Aug 25, 2026
c0aa3bb
OpenSSL 3.5.8 (#1231)
jjhelmus Aug 25, 2026
7ce3118
Merge upstream tag 20260825 (conflicts — see PR)
github-actions[bot] Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ jobs:
--platform linux \
--labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" \
--max-shards 2 \
--event ${{ github.event_name }} \
${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} \
--free-runners \
> matrix.json
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ jobs:
- name: Generate build matrix
id: set-matrix
run: |
<<<<<<< HEAD
uv run ci-matrix.py --platform darwin --labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} --free-runners > matrix.json
=======
uv run ci-matrix.py --platform darwin --labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" --event ${{ github.event_name }} ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} > matrix.json
>>>>>>> refs/tags/20260825

# Extract python-build matrix
echo "matrix=$(jq -c '."python-build"' matrix.json)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -171,6 +175,12 @@ jobs:
repository: phracker/MacOSX-SDKs
ref: master
path: macosx-sdks
sparse-checkout: |
/MacOSX10.15.sdk/SDKSettings.json
/MacOSX10.15.sdk/**/*.tbd
/MacOSX11.*.sdk/SDKSettings.json
/MacOSX11.*.sdk/**/*.tbd
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Validate Distribution
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,100 @@ jobs:
subject-path: |
dist/*.tar.gz
dist/*.tar.zst
<<<<<<< HEAD
=======

- name: Publish to Astral mirror
env:
AWS_ACCESS_KEY_ID: ${{ secrets.MIRROR_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.MIRROR_R2_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL: https://${{ secrets.MIRROR_R2_CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
AWS_DEFAULT_REGION: auto
R2_BUCKET: ${{ secrets.MIRROR_R2_BUCKET_NAME }}
PROJECT: python-build-standalone
VERSION: ${{ github.event.inputs.tag }}
DRY_RUN: ${{ github.event.inputs.dry-run }}
run: |
if [ "${DRY_RUN}" = 'true' ]; then
just release-upload-mirror-dry-run \
${R2_BUCKET} \
github/${PROJECT}/releases/download/${VERSION}/ \
${VERSION}
else
just release-upload-mirror \
${R2_BUCKET} \
github/${PROJECT}/releases/download/${VERSION}/ \
${VERSION}
fi

- name: Generate versions metadata
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: uv run generate-version-metadata.py > dist/versions.ndjson

- name: Validate metadata
if: ${{ github.event.inputs.dry-run == 'false' }}
run: |
echo "Generated $(wc -l < dist/versions.ndjson) version entries"
head -c 1000 dist/versions.ndjson

- name: Set branch name
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
TAG: ${{ github.event.inputs.tag }}
run: echo "BRANCH_NAME=update-versions-$TAG-$(date +%s)" >> $GITHUB_ENV

- name: Clone versions repo
if: ${{ github.event.inputs.dry-run == 'false' }}
run: git clone https://${{ secrets.ASTRAL_VERSIONS_PAT }}@github.com/astral-sh/versions.git astral-versions

- name: Update versions
if: ${{ github.event.inputs.dry-run == 'false' }}
run: cat dist/versions.ndjson | uv run astral-versions/scripts/insert-versions.py --name python-build-standalone

- name: Commit versions
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
TAG: ${{ github.event.inputs.tag }}
working-directory: astral-versions
run: |
git config user.name "astral-versions-bot"
git config user.email "176161322+astral-versions-bot@users.noreply.github.com"

git checkout -b "$BRANCH_NAME"
git add -A
git commit -m "Update python-build-standalone to $TAG"

- name: Create Pull Request
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
TAG: ${{ github.event.inputs.tag }}
GH_TOKEN: ${{ secrets.ASTRAL_VERSIONS_PAT }}
working-directory: astral-versions
run: |
pull_request_title="Update python-build-standalone versions for $TAG"

gh pr list --state open --json title --jq ".[] | select(.title == \"$pull_request_title\") | .number" | \
xargs -I {} gh pr close {}

git push origin "$BRANCH_NAME"

gh pr create --base main --head "$BRANCH_NAME" \
--title "$pull_request_title" \
--body "Automated versions update for $TAG" \
--label "automation"

- name: Merge Pull Request
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
GH_TOKEN: ${{ secrets.ASTRAL_VERSIONS_PAT }}
working-directory: astral-versions
run: |
# Wait for PR to be created before merging
sleep 10
# Use admin to bypass required review
gh pr merge --squash --admin "$BRANCH_NAME"

>>>>>>> refs/tags/20260825
7 changes: 7 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ jobs:
- name: Generate build matrix
id: set-matrix
run: |
<<<<<<< HEAD
uv run ci-matrix.py --platform windows --labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} --free-runners > matrix.json
=======
uv run ci-matrix.py --platform windows --labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" --event ${{ github.event_name }} ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} > matrix.json
>>>>>>> refs/tags/20260825

# Extract python-build matrix
echo "matrix=$(jq -c '."python-build"' matrix.json)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -186,4 +190,7 @@ jobs:
run: |
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
.\pythonbuild.exe validate-distribution $Dists
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
uv run --no-dev test-distribution.py $Dists
43 changes: 43 additions & 0 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## python-build-standalone performance

<img
width="1820" height="1730"
alt="Shows a chart with violin plots with benchmark results"
src="https://github.com/user-attachments/assets/5499f9ce-ee02-4485-baa2-9d982fe457e6"
/>

The figure above compares CPython 3.14.6 performance across several distributions using pyperformance. Each [violin](https://en.wikipedia.org/wiki/Violin_plot) represents the distribution of per-benchmark mean runtime ratios between an alternative CPython distribution and python-build-standalone on the same platform and architecture. Ratios greater than 1 indicate that python-build-standalone was faster; ratios less than 1 indicate that the alternative distribution was faster.

The horizontal axis uses a logarithmic scale. The vertical marker within each violin indicates the geometric mean of the runtime ratios, which is also expressed as a percentage beside each distribution.

From top to bottom, the distributions shown are:
* The Docker `python:3.14` image for x86-64, providing CPython 3.14.6.
* A conda-forge Python 3.14.6 environment for `linux-64`.
* The system Python 3.14.6 in a `fedora:44` x86-64 Docker container.
* The system Python 3.14.6 in a `debian:forky` x86-64 Docker container.
* CPython 3.14.6 from the [Python.org macOS installer](https://www.python.org/ftp/python/3.14.6/python-3.14.6-macos11.pkg) on an arm64 Mac.
* A conda-forge Python 3.14.6 environment for `osx-arm64`.
* CPython 3.14.6 installed through Homebrew on an arm64 Mac.
* CPython 3.14.6 from the Python.org Windows installer for x86-64.
* A conda-forge Python 3.14.6 environment for `win-64`.

The reference interpreter for each comparison was the corresponding platform- and architecture-matched python-build-standalone CPython 3.14.6 distribution from the [`20260623` release](https://github.com/astral-sh/python-build-standalone/releases#release-20260623), installed using `uv`.

Benchmarks were run in early to mid-July 2026 and reflect the distributions and packages available during that period.

Supporting material, including [Dockerfiles](https://github.com/jjhelmus/cpython-benchmarks/tree/main/containers), commands for creating conda environments, and scripts for running the benchmarks, can be found in [jjhelmus/cpython-benchmarks](https://github.com/jjhelmus/cpython-benchmarks). This repository also contains the raw data and the [script](https://github.com/jjhelmus/cpython-benchmarks/blob/main/plot_pbs_314_comparison.py) used to produce the figure.

### Benchmark methodology

Benchmarks were executed from a virtual environment created with the reference interpreter into which pyperformance 1.14.0 was installed. Results were collected using:
``` shell
pyperformance run --rigorous --warmups 2 --output <logfile>
```

The complete benchmark suite was run at least twice to assess consistency.

Linux benchmarks were run inside Docker containers on an Ubuntu 24.04 host with an Intel Core i9-9900K processor. Hyper-Threading and Intel SpeedStep were disabled.

macOS benchmarks were run on a MacBook Pro with an Apple M5 Max processor.

Windows benchmarks were run on a Windows 11 host with an Intel Core i5-9500 processor. Intel Turbo Boost was disabled; this processor does not support Hyper-Threading.
47 changes: 30 additions & 17 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,41 @@ Building distributions
See the [documentation](https://gregoryszorc.com/docs/python-build-standalone/main/building.html)
for instructions on building distributions locally.

CI labels
=========
By default, submitting a pull request triggers a complete build of all
distributions in CI, which can be time-consuming.
Pull request labels
===================
By default, pull requests build a small subset of targets defined in
``ci-defaults.yaml`` under ``pull_request``. Pushes to ``main`` build the full
matrix from ``ci-targets.yaml``.

To conserve CI resources and reduce build times, you can limit the matrix of
distributions built by applying specific labels to your pull request. Only
distributions matching the specified labels will be built.
Pull request labels can be used to change what CI builds:

The following label prefixes can be used to customize the build matrix:
* ``platform:<value>`` filters the selected targets by platform.
* ``arch:<value>`` filters the selected targets by architecture.
* ``libc:<value>`` filters the selected targets by libc.
* ``python:<value>`` filters the selected Python versions.
* ``build:<value>`` filters the selected build options by component.

* `platform`
* `python`
* `build`
* `arch`
* `libc`
The ``:all`` labels expand only their own dimension:

To bypass CI entirely for changes that do not affect the build (such as
documentation updates), use the `ci:skip` label.
* ``platform:all`` expands the selected platforms.
* ``arch:all`` expands the selected architectures.
* ``libc:all`` expands the selected libc variants.
* ``python:all`` expands the selected Python versions.
* ``build:all`` expands the selected build options.

Please utilize these tags when appropriate for your changes to minimize CI
resource consumption.
Use ``ci:all-targets`` to build the full matrix from ``ci-targets.yaml``.

Examples:

* ``platform:linux`` builds only the Linux targets from ``ci-defaults.yaml``.
* ``python:3.13`` builds the default targets with Python 3.13.
* ``build:pgo`` builds the selected targets whose build options include ``pgo``.
* ``platform:linux,arch:all,libc:all,python:all,build:all`` builds the full
Linux matrix.

To bypass CI entirely for changes that do not affect the build, use the
``ci:skip`` label. The ``documentation`` label is treated the same way. To run
a dry-run build matrix, use ``ci:dry-run``.

Releases
========
Expand Down
25 changes: 19 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions ci-defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Describes the default targets that CI will build for different events.

pull_request:
python_version: "3.14"

targets:
x86_64-pc-windows-msvc:
build_options:
- pgo

aarch64-apple-darwin:
build_options:
- pgo+lto

x86_64-unknown-linux-gnu:
build_options:
- pgo+lto
- freethreaded+pgo+lto

x86_64-unknown-linux-musl:
build_options:
- lto
- lto+static
- freethreaded+lto

armv7-unknown-linux-gnueabihf:
build_options:
- lto
Loading
Loading