Skip to content

Commit f181144

Browse files
Merge branch 'main' into what-snew
2 parents 22c1bd1 + e6a9269 commit f181144

7 files changed

Lines changed: 48 additions & 38 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,6 @@ jobs:
322322

323323
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
324324
with:
325+
name: ios
325326
path: cross-build/dist/*
326327
if-no-files-found: error

release.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def normalized(self) -> str:
193193

194194
@property
195195
def branch(self) -> str:
196-
return "main" if self.is_alpha_release else f"{self.major}.{self.minor}"
196+
if self.is_alpha_release or self.is_feature_freeze_release:
197+
return "main"
198+
return f"{self.major}.{self.minor}"
197199

198200
@property
199201
def is_alpha_release(self) -> bool:

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,8 @@ typing-extensions==4.15.0 \
969969
typing-inspection==0.4.2 \
970970
--hash=sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7
971971
# via pydantic
972-
urllib3==2.6.3 \
973-
--hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4
972+
urllib3==2.7.0 \
973+
--hash=sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897
974974
# via
975975
# requests
976976
# tuf

run_release.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ def wait_for_build_release(db: ReleaseShelf) -> None:
601601
downloads_path / f"python-{release_tag}-{arch}-linux-android.tar.gz"
602602
for arch in ["aarch64", "x86_64"]
603603
]
604+
if release_tag.as_tuple() >= (3, 15):
605+
wait_for_paths.append(
606+
downloads_path / f"python-{release_tag}-iOS-XCframework.tar.gz"
607+
)
604608
if should_wait_for_docs:
605609
docs_path = release_path / "docs"
606610
docs_path.mkdir(parents=True, exist_ok=True)
@@ -1142,8 +1146,13 @@ def post_release_tagging(db: ReleaseShelf) -> None:
11421146
cwd=db["git_repo"],
11431147
)
11441148

1149+
if release_tag.is_feature_freeze_release:
1150+
checkout_branch = release_tag.basic_version
1151+
else:
1152+
checkout_branch = release_tag.branch
1153+
11451154
subprocess.check_call(
1146-
["git", "checkout", release_tag.branch],
1155+
["git", "checkout", checkout_branch],
11471156
cwd=db["git_repo"],
11481157
)
11491158

@@ -1219,7 +1228,7 @@ def branch_new_versions(db: ReleaseShelf) -> None:
12191228
subprocess.check_call(["git", "checkout", "main"], cwd=db["git_repo"])
12201229

12211230
subprocess.check_call(
1222-
["git", "checkout", "-b", release_tag.branch],
1231+
["git", "checkout", "-b", release_tag.basic_version],
12231232
cwd=db["git_repo"],
12241233
)
12251234

tests/test_release_tag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,31 @@ def test_tag_phase() -> None:
4141
assert alpha.is_feature_freeze_release is False
4242
assert alpha.is_release_candidate is False
4343
assert alpha.is_final is False
44+
assert alpha.branch == "main"
4445

4546
assert beta1.is_alpha_release is False
4647
assert beta1.is_feature_freeze_release is True
4748
assert beta1.is_release_candidate is False
4849
assert beta1.is_final is False
50+
assert beta1.branch == "main"
4951

5052
assert beta4.is_alpha_release is False
5153
assert beta4.is_feature_freeze_release is False
5254
assert beta4.is_release_candidate is False
5355
assert beta4.is_final is False
56+
assert beta4.branch == "3.13"
5457

5558
assert rc.is_alpha_release is False
5659
assert rc.is_feature_freeze_release is False
5760
assert rc.is_release_candidate is True
5861
assert rc.is_final is False
62+
assert rc.branch == "3.13"
5963

6064
assert final.is_alpha_release is False
6165
assert final.is_feature_freeze_release is False
6266
assert final.is_release_candidate is False
6367
assert final.is_final is True
68+
assert final.branch == "3.13"
6469

6570

6671
def test_tag_committed_at_not_found() -> None:

tests/test_run_release.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def test_invalid_extract_github_owner() -> None:
5959
[
6060
# Success cases
6161
("3.15.0rc1", "3.15\n", does_not_raise()),
62-
("3.15.0b1", "3.15\n", does_not_raise()),
62+
("3.15.0b3", "3.15\n", does_not_raise()),
63+
("3.15.0b2", "3.15\n", does_not_raise()),
64+
("3.15.0b1", "main\n", does_not_raise()),
6365
("3.15.0a6", "main\n", does_not_raise()),
6466
("3.14.3", "3.14\n", does_not_raise()),
6567
("3.13.12", "3.13\n", does_not_raise()),
@@ -71,8 +73,8 @@ def test_invalid_extract_github_owner() -> None:
7173
),
7274
(
7375
"3.15.0b1",
74-
"main\n",
75-
pytest.raises(ReleaseException, match="on main branch, expected 3.15"),
76+
"3.15\n",
77+
pytest.raises(ReleaseException, match="on 3.15 branch, expected main"),
7678
),
7779
(
7880
"3.15.0a6",

windows-release/tcltk-build.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
parameters:
2-
- name: TclSourceTag
3-
displayName: 'Tcl Source Tag'
2+
- name: TclVersion
3+
displayName: 'Tcl Version'
44
type: string
5-
- name: TkSourceTag
6-
displayName: 'Tk Source Tag'
5+
- name: TkVersion
6+
displayName: 'Tk Version'
7+
type: string
8+
- name: TclTagPrefix
9+
displayName: 'Tcl source tag prefix'
710
type: string
8-
- name: IncludeTix
9-
displayName: 'Include Tix (pre-3.13)'
10-
type: boolean
11-
default: false
12-
- name: TixSourceTag
13-
displayName: 'Tix Source Tag'
11+
default: 'tcl-'
12+
- name: TkTagPrefix
13+
displayName: 'Tk source tag prefix'
1414
type: string
15-
default: tix-8.4.3.6
15+
default: 'tk-'
1616
- name: SigningCertificate
1717
displayName: "Code signing certificate"
1818
type: string
@@ -27,7 +27,7 @@ parameters:
2727
default: 'https://github.com/python/cpython-source-deps'
2828

2929

30-
name: tcltk$(TkSourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
30+
name: tcltk$(TkVersion)_$(Date:yyyyMMdd)$(Rev:.rr)
3131

3232

3333
resources:
@@ -52,15 +52,17 @@ variables:
5252
- name: Configuration
5353
value: 'Release'
5454
- name: SigningDescription
55-
value: 'Tcl/Tk for Python (${{ parameters.TclSourceTag }})'
55+
value: 'Tcl/Tk for Python (${{ parameters.TkVersion }})'
5656
- name: SourcesRepo
5757
value: ${{ parameters.SourcesRepo }}
58+
- name: TclVersion
59+
value: ${{ parameters.TclVersion }}
60+
- name: TkVersion
61+
value: ${{ parameters.TkVersion }}
5862
- name: TclSourceTag
59-
value: ${{ parameters.TclSourceTag }}
63+
value: ${{ parameters.TclTagPrefix }}${{ parameters.TclVersion }}
6064
- name: TkSourceTag
61-
value: ${{ parameters.TkSourceTag }}
62-
- name: TixSourceTag
63-
value: ${{ parameters.TixSourceTag }}
65+
value: ${{ parameters.TkTagPrefix }}${{ parameters.TkVersion }}
6466

6567

6668
jobs:
@@ -85,19 +87,15 @@ jobs:
8587
git clone $(SourcesRepo) -b $(TkSourceTag) --depth 1 "$(ExternalsDir)\$(TkSourceTag)"
8688
displayName: 'Check out Tk sources'
8789
88-
- ${{ if eq(parameters.IncludeTix, 'true') }}:
89-
- powershell: |
90-
git clone $(SourcesRepo) -b $(TixSourceTag) --depth 1 "$(ExternalsDir)\$(TixSourceTag)"
91-
displayName: 'Check out Tix sources'
92-
9390
# This msbuild.rsp file will be used by the build to forcibly override these variables
9491
- powershell: |
9592
del -Force -EA 0 msbuild.rsp
9693
"/p:IntDir=$(IntDir)\" >> msbuild.rsp
9794
"/p:ExternalsDir=$(ExternalsDir)\" >> msbuild.rsp
9895
"/p:tclDir=$(ExternalsDir)\$(TclSourceTag)\" >> msbuild.rsp
9996
"/p:tkDir=$(ExternalsDir)\$(TkSourceTag)\" >> msbuild.rsp
100-
"/p:tixDir=$(ExternalsDir)\$(TixSourceTag)\" >> msbuild.rsp
97+
"/p:TclVersion=$(TclVersion)" >> msbuild.rsp
98+
"/p:TkVersion=$(TkVersion)" >> msbuild.rsp
10199
displayName: 'Generate msbuild.rsp'
102100
103101
- powershell: |
@@ -115,13 +113,6 @@ jobs:
115113
& "$(msbuild)" cpython\PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
116114
displayName: 'Build for arm64'
117115
118-
- ${{ if eq(parameters.IncludeTix, 'true') }}:
119-
- powershell: |
120-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
121-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
122-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
123-
displayName: 'Build Tix'
124-
125116
- ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
126117
- template: sign-files.yml
127118
parameters:

0 commit comments

Comments
 (0)