Skip to content

Commit 997201d

Browse files
authored
Merge branch 'main' into fix-whatsnew-template
2 parents 73fe37e + a738d97 commit 997201d

19 files changed

+1192
-189
lines changed

.github/workflows/source-and-docs-release.yml renamed to .github/workflows/build-release.yml

Lines changed: 76 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,37 @@ on:
3535
type: string
3636
description: "CPython release number (ie '3.11.5', note without the 'v' prefix)"
3737

38-
name: "Build Python source and docs artifacts"
38+
name: "Build release artifacts"
3939

4040
permissions: {}
4141

4242
# Set from inputs for workflow_dispatch, or set defaults to test push/PR events
4343
env:
4444
GIT_REMOTE: ${{ github.event.inputs.git_remote || 'python' }}
45-
GIT_COMMIT: ${{ github.event.inputs.git_commit || '4f8bb3947cfbc20f970ff9d9531e1132a9e95396' }}
46-
CPYTHON_RELEASE: ${{ github.event.inputs.cpython_release || '3.13.2' }}
45+
GIT_COMMIT: ${{ github.event.inputs.git_commit || '31967d8de3d27889dd1819b8dccc2bdc17c030c1' }}
46+
CPYTHON_RELEASE: ${{ github.event.inputs.cpython_release || '3.14.0rc2' }}
4747

4848
jobs:
4949
verify-input:
5050
runs-on: ubuntu-24.04
51+
timeout-minutes: 5
5152
outputs:
52-
# Needed because env vars are not available in the build-docs check below
53-
cpython_release: ${{ env.CPYTHON_RELEASE }}
53+
build-docs: ${{ steps.select-jobs.outputs.docs }}
54+
build-android: ${{ steps.select-jobs.outputs.android }}
5455
steps:
5556
- name: "Workflow run information"
5657
run: |
5758
echo "git_remote: $GIT_REMOTE"
5859
echo "git_commit: $GIT_COMMIT"
5960
echo "cpython_release: $CPYTHON_RELEASE"
6061
62+
- name: "Checkout python/release-tools"
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
64+
with:
65+
persist-credentials: false
66+
6167
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
62-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6369
with:
6470
persist-credentials: false
6571
repository: "${{ env.GIT_REMOTE }}/cpython"
@@ -73,18 +79,29 @@ jobs:
7379
exit 1
7480
fi
7581
82+
- name: "Setup Python"
83+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
84+
with:
85+
python-version: 3.12
86+
87+
- name: "Select jobs"
88+
id: select-jobs
89+
run: |
90+
./select_jobs.py "$CPYTHON_RELEASE" | tee -a "$GITHUB_OUTPUT"
91+
7692
build-source:
7793
runs-on: ubuntu-24.04
94+
timeout-minutes: 15
7895
needs:
7996
- verify-input
8097
steps:
8198
- name: "Checkout python/release-tools"
82-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
83100
with:
84101
persist-credentials: false
85102

86103
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
87-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
88105
with:
89106
persist-credentials: false
90107
repository: "${{ env.GIT_REMOTE }}/cpython"
@@ -115,14 +132,13 @@ jobs:
115132
116133
build-docs:
117134
runs-on: ubuntu-24.04
135+
timeout-minutes: 45
118136
needs:
119137
- verify-input
120-
121-
# Docs aren't built for alpha or beta releases.
122-
if: (!(contains(needs.verify-input.outputs.cpython_release, 'a') || contains(needs.verify-input.outputs.cpython_release, 'b')))
138+
if: fromJSON(needs.verify-input.outputs.build-docs)
123139
steps:
124140
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
125-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
141+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
126142
with:
127143
persist-credentials: false
128144
repository: "${{ env.GIT_REMOTE }}/cpython"
@@ -135,14 +151,19 @@ jobs:
135151

136152
- name: "Install docs dependencies"
137153
run: |
138-
python -m pip install \
139-
-r Doc/requirements.txt
140-
154+
python -m pip install -r Doc/requirements.txt
141155
sudo apt-get update
142156
sudo apt-get install --yes --no-install-recommends \
143-
latexmk texlive-xetex xindy texinfo texlive-latex-base \
144-
texlive-fonts-recommended texlive-fonts-extra \
145-
texlive-full
157+
fonts-freefont-otf \
158+
latexmk \
159+
texinfo \
160+
texlive-fonts-extra \
161+
texlive-fonts-recommended \
162+
texlive-latex-base \
163+
texlive-latex-extra \
164+
texlive-latex-recommended \
165+
texlive-xetex \
166+
xindy
146167
147168
- name: "Build docs"
148169
run: |
@@ -158,11 +179,12 @@ jobs:
158179
159180
test-source:
160181
runs-on: ubuntu-24.04
182+
timeout-minutes: 60
161183
needs:
162184
- build-source
163185
steps:
164186
- name: "Download the source artifacts"
165-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
187+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
166188
with:
167189
name: source
168190

@@ -180,3 +202,38 @@ jobs:
180202
181203
cd ../installation
182204
./bin/python3 -m test -uall
205+
206+
build-android:
207+
name: build-android (${{ matrix.arch }})
208+
needs:
209+
- verify-input
210+
if: fromJSON(needs.verify-input.outputs.build-android)
211+
212+
strategy:
213+
matrix:
214+
include:
215+
- arch: aarch64
216+
runs-on: macos-15
217+
- arch: x86_64
218+
runs-on: ubuntu-24.04
219+
220+
runs-on: ${{ matrix.runs-on }}
221+
timeout-minutes: 60
222+
env:
223+
triplet: ${{ matrix.arch }}-linux-android
224+
steps:
225+
- name: "Checkout ${{ env.GIT_REMOTE }}/cpython"
226+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
227+
with:
228+
persist-credentials: false
229+
repository: "${{ env.GIT_REMOTE }}/cpython"
230+
ref: "v${{ env.CPYTHON_RELEASE }}"
231+
232+
- name: Build and test
233+
run: ./Android/android.py ci "$triplet"
234+
235+
- uses: actions/upload-artifact@v4
236+
with:
237+
name: ${{ env.triplet }}
238+
path: cross-build/${{ env.triplet }}/dist/*
239+
if-no-files-found: error

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
persist-credentials: false
1919
- uses: actions/setup-python@v5

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
python-version: ["3.12", "3.13"]
1818
os: [macos-latest, ubuntu-latest]
1919
steps:
20-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121
with:
2222
persist-credentials: false
2323
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0

LICENSE.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
2+
--------------------------------------------
3+
4+
1. This LICENSE AGREEMENT is between the Python Software Foundation
5+
("PSF"), and the Individual or Organization ("Licensee") accessing and
6+
otherwise using this software ("Python") in source or binary form and
7+
its associated documentation.
8+
9+
2. Subject to the terms and conditions of this License Agreement, PSF hereby
10+
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
11+
analyze, test, perform and/or display publicly, prepare derivative works,
12+
distribute, and otherwise use Python alone or in any derivative version,
13+
provided, however, that PSF's License Agreement and PSF's notice of copyright,
14+
i.e., "Copyright (c) 2008 Python Software Foundation; All Rights Reserved"
15+
are retained in Python alone or in any derivative version prepared by Licensee.
16+
17+
3. In the event Licensee prepares a derivative work that is based on
18+
or incorporates Python or any part thereof, and wants to make
19+
the derivative work available to others as provided herein, then
20+
Licensee hereby agrees to include in any such work a brief summary of
21+
the changes made to Python.
22+
23+
4. PSF is making Python available to Licensee on an "AS IS"
24+
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
25+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
26+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
27+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
28+
INFRINGE ANY THIRD PARTY RIGHTS.
29+
30+
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
31+
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
32+
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
33+
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
34+
35+
6. This License Agreement will automatically terminate upon a material
36+
breach of its terms and conditions.
37+
38+
7. Nothing in this License Agreement shall be deemed to create any
39+
relationship of agency, partnership, or joint venture between PSF and
40+
Licensee. This License Agreement does not grant permission to use PSF
41+
trademarks or trade name in a trademark sense to endorse or promote
42+
products or services of Licensee, or any third party.
43+
44+
8. By copying, installing or otherwise using Python, Licensee
45+
agrees to be bound by the terms and conditions of this License
46+
Agreement.

0 commit comments

Comments
 (0)