Skip to content

Commit ef58d43

Browse files
authored
Remove unused CHM handling (#148)
1 parent 8e17bb4 commit ef58d43

File tree

7 files changed

+14
-52
lines changed

7 files changed

+14
-52
lines changed

add_to_pydotorg.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def get_file_descriptions(
122122
("Windows embeddable package (32-bit)", 1, False, ""),
123123
),
124124
(rx(r"\.exe$"), ("Windows installer (32-bit)", 1, v < (3, 9), "")),
125-
(rx(r"\.chm$"), ("Windows help file", 1, False, "")),
126125
(
127126
rx(r"-macosx10\.5(_rev\d)?\.(dm|pk)g$"),
128127
(
@@ -259,26 +258,26 @@ def list_files(release: str) -> Generator[tuple[str, str, int, bool, str], None,
259258
for rfile in os.listdir(path.join(ftp_root, reldir)):
260259
if not path.isfile(path.join(ftp_root, reldir, rfile)):
261260
continue
261+
262262
if rfile.endswith((".asc", ".sig", ".crt", ".sigstore", ".spdx.json")):
263263
continue
264+
264265
for prefix in ("python", "Python"):
265266
if rfile.startswith(prefix):
266267
break
267268
else:
268269
print(f" File {reldir}/{rfile} has wrong prefix")
269270
continue
270-
if rfile.endswith(".chm"):
271-
if rfile[:-4] != "python" + release.replace(".", ""):
272-
print(f" File {reldir}/{rfile} has a different version")
273-
continue
274-
else:
275-
try:
276-
prefix, rest = rfile.split("-", 1)
277-
except: # noqa: E722
278-
prefix, rest = rfile, ""
279-
if not rest.startswith((release + "-", release + ".")):
280-
print(f" File {reldir}/{rfile} has a different version")
281-
continue
271+
272+
try:
273+
prefix, rest = rfile.split("-", 1)
274+
except: # noqa: E722
275+
prefix, rest = rfile, ""
276+
277+
if not rest.startswith((release + "-", release + ".")):
278+
print(f" File {reldir}/{rfile} has a different version")
279+
continue
280+
282281
for rx, info in get_file_descriptions(release):
283282
if rx.search(rfile):
284283
file_desc, os_pk, add_download, add_desc = info

size.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
sort_order = {
1414
ext: i
1515
for i, ext in enumerate(
16-
("tgz", "tar.bz2", "tar.xz", "pdb.zip", "amd64.msi", "msi", "chm", "dmg")
16+
("tgz", "tar.bz2", "tar.xz", "pdb.zip", "amd64.msi", "msi", "dmg")
1717
)
1818
}
1919

tests/test_size.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
("file.pdb.zip", False),
1313
("file.amd64.msi", False),
1414
("file.msi", False),
15-
("file.chm", False),
1615
("file.dmg", False),
1716
("file.ext", True),
1817
],
@@ -30,8 +29,7 @@ def test_ignore(filename: str, expected: bool) -> None:
3029
("file.pdb.zip", 3),
3130
("file.amd64.msi", 4),
3231
("file.msi", 5),
33-
("file.chm", 6),
34-
("file.dmg", 7),
32+
("file.dmg", 6),
3533
("file.ext", 9999),
3634
],
3735
)

windows-release/azure-pipelines.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ parameters:
6464
displayName: "Run ARM64 PGO (requires custom VM)"
6565
type: boolean
6666
default: true
67-
- name: DoCHM
68-
displayName: "Produce compiled help document (pre-3.11)"
69-
type: boolean
70-
default: false
7167
- name: DoLayout
7268
displayName: "Produce full layout artifact"
7369
type: boolean
@@ -110,7 +106,6 @@ variables:
110106
IsRealSigned: true
111107
${{ else }}:
112108
IsRealSigned: false
113-
DoCHM: ${{ parameters.DoCHM }}
114109
DoFreethreaded: ${{ parameters.DoFreethreaded }}
115110
DoLayout: ${{ parameters.DoLayout }}
116111
DoMSIX: ${{ parameters.DoMSIX }}

windows-release/stage-build.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,13 @@ jobs:
2222
env:
2323
BUILDDIR: $(Build.BinariesDirectory)\Doc
2424

25-
- script: Doc\make.bat htmlhelp
26-
displayName: 'Build CHM docs'
27-
condition: and(succeeded(), eq(variables['DoCHM'], 'true'))
28-
env:
29-
BUILDDIR: $(Build.BinariesDirectory)\Doc
30-
3125
- task: CopyFiles@2
3226
displayName: 'Assemble artifact: Doc'
3327
inputs:
3428
sourceFolder: $(Build.BinariesDirectory)\Doc
3529
targetFolder: $(Build.ArtifactStagingDirectory)\Doc
3630
contents: |
3731
html\**\*
38-
htmlhelp\*.chm
3932
4033
- task: PublishPipelineArtifact@0
4134
displayName: 'Publish artifact: doc'

windows-release/stage-publish-pythonorg.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ jobs:
112112
git clone https://github.com/python/cpython-bin-deps --branch gpg --single-branch --depth 1 --progress -v "gpg"
113113
gpg/gpg2.exe --import "$(gpgkey.secureFilePath)"
114114
$files = gci -File "msi\*\*", "embed\*.zip"
115-
if ("$(DoCHM)" -ieq "true") {
116-
$files = $files + (gci -File "doc\htmlhelp\*.chm")
117-
}
118115
$files.FullName | %{
119116
gpg/gpg2.exe -ba --batch --passphrase $(GPGPassphrase) $_
120117
"Made signature for $_"
@@ -148,7 +145,6 @@ jobs:
148145
-server $(PyDotOrgServer)
149146
-hostkey $(PyDotOrgHostKey)
150147
-keyfile "$(sshkey.secureFilePath)"
151-
-doc_htmlhelp doc\htmlhelp
152148
-embed embed
153149
-sbom sbom
154150
workingDirectory: $(Build.BinariesDirectory)
@@ -187,9 +183,6 @@ jobs:
187183
- ${{ each alg in parameters.HashAlgorithms }}:
188184
- powershell: |
189185
$files = gci -File "msi\*\*.exe", "embed\*.zip"
190-
if ("$(DoCHM)" -ieq "true") {
191-
$files = $files + (gci -File "doc\htmlhelp\python*.chm")
192-
}
193186
$hashes = $files | `
194187
Sort-Object Name | `
195188
Format-Table Name, @{
@@ -206,9 +199,6 @@ jobs:
206199
- powershell: |
207200
"Copying:"
208201
$files = gci -File "msi\*\python*.asc", "embed\*.asc"
209-
if ("$(DoCHM)" -ieq "true") {
210-
$files = $files + (gci -File "doc\htmlhelp\*.asc")
211-
}
212202
$files.FullName
213203
$d = mkdir "$(Build.ArtifactStagingDirectory)\hashes" -Force
214204
move $files $d -Force

windows-release/uploadrelease.ps1

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
The subdirectory on the host to copy files to.
1616
.Parameter tests
1717
The path to run download tests in.
18-
.Parameter doc_htmlhelp
19-
Optional path besides -build to locate CHM files.
2018
.Parameter embed
2119
Optional path besides -build to locate ZIP files.
2220
#>
@@ -28,7 +26,6 @@ param(
2826
[Parameter(Mandatory=$true)][string]$keyfile,
2927
[string]$target="/srv/www.python.org/ftp/python",
3028
[string]$tests=${env:TEMP},
31-
[string]$doc_htmlhelp=$null,
3229
[string]$embed=$null,
3330
[string]$sbom=$null
3431
)
@@ -69,20 +66,10 @@ $plink = find-putty-tool "plink"
6966
"Upload using $pscp and $plink"
7067
""
7168

72-
if ($doc_htmlhelp) {
73-
$chm = gci -EA 0 $doc_htmlhelp\python*.chm, $doc_htmlhelp\python*.chm.asc
74-
} else {
75-
$chm = gci -EA 0 $build\python*.chm, $build\python*.chm.asc
76-
}
77-
7869
$d = "$target/$($p[0])/"
7970
& $plink -batch -hostkey $hostkey -noagent -i $keyfile "$user@$server" mkdir $d
8071
& $plink -batch -hostkey $hostkey -noagent -i $keyfile "$user@$server" chgrp downloads $d
8172
& $plink -batch -hostkey $hostkey -noagent -i $keyfile "$user@$server" chmod "a+rx" $d
82-
if ($chm) {
83-
& $pscp -batch -hostkey $hostkey -noagent -i $keyfile $chm.FullName "$user@${server}:$d"
84-
if (-not $?) { throw "Failed to upload $chm" }
85-
}
8673

8774
$dirs = gci "$build" -Directory
8875
if ($embed) {

0 commit comments

Comments
 (0)