Skip to content

Commit 2e6f6df

Browse files
gpsheadclaude
andcommitted
gh-91242: Remove CHM (Compiled HTML Help) build infrastructure
Remove all CHM compilation infrastructure to complete the deprecation that began in August 2022. CHM format documentation is now obsolete and has been replaced by HTML documentation. Changes: - Doc/: Remove CHM compilation from make.bat, remove htmlhelp config from conf.py, update Makefile and README.rst to remove CHM references - PC/layout/: Remove CHM file copying, constants, options, and manifest entries from the Windows package layout system - Tools/msi/: Remove CHM support from MSI installer build and upload scripts The htmlhelp build target is retained as it remains useful for generating HTML Help format files without CHM compilation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 74036e5 commit 2e6f6df

File tree

13 files changed

+4
-87
lines changed

13 files changed

+4
-87
lines changed

Doc/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ html: build
8484
.PHONY: htmlhelp
8585
htmlhelp: BUILDER = htmlhelp
8686
htmlhelp: build
87-
@echo "Build finished; now you can run HTML Help Workshop with the" \
88-
"build/htmlhelp/pydoc.hhp project file."
87+
@echo "Build finished. The HTML Help files are in build/htmlhelp."
8988

9089
.PHONY: latex
9190
latex: BUILDER = latex

Doc/README.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,8 @@ Available make targets are:
6666
starts a local server, and automatically reloads the page in your browser
6767
when you make changes to reST files (Unix only).
6868

69-
* "htmlhelp", which builds HTML files and a HTML Help project file usable to
70-
convert them into a single Compiled HTML (.chm) file -- these are popular
71-
under Microsoft Windows, but very handy on every platform.
72-
73-
To create the CHM file, you need to run the Microsoft HTML Help Workshop
74-
over the generated project (.hhp) file. The ``make.bat`` script does this for
75-
you on Windows.
69+
* "htmlhelp", which builds HTML files in HTML Help format -- this format
70+
is useful on every platform.
7671

7772
* "latex", which builds LaTeX source files as input to ``pdflatex`` to produce
7873
PDF documents.

Doc/conf.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,6 @@
278278
'<a href="https://about.readthedocs.com/">Read the Docs</a>'
279279
)
280280

281-
# Override stylesheet fingerprinting for Windows CHM htmlhelp to fix GH-91207
282-
# https://github.com/python/cpython/issues/91207
283-
if any('htmlhelp' in arg for arg in sys.argv):
284-
html_style = 'pydoctheme.css'
285-
print("\nWARNING: Windows CHM Help is no longer supported.")
286-
print("It may be removed in the future\n")
287-
288281
# Short title used e.g. for <title> HTML tags.
289282
html_short_title = f'{release} Documentation'
290283

@@ -327,9 +320,6 @@
327320
# Additional static files.
328321
html_static_path = ['_static', 'tools/static']
329322

330-
# Output file base name for HTML help builder.
331-
htmlhelp_basename = 'python' + release.replace('.', '')
332-
333323
# Split the index
334324
html_split_index = True
335325

Doc/make.bat

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,6 @@ if not defined SPHINXLINT (
4848
set SPHINXLINT=%PYTHON% -m sphinxlint
4949
)
5050

51-
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
52-
if exist "%HTMLHELP%" goto :skiphhcsearch
53-
54-
rem Search for HHC in likely places
55-
set HTMLHELP=
56-
where hhc /q && set "HTMLHELP=hhc" && goto :skiphhcsearch
57-
where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
58-
if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
59-
if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
60-
if not exist "%HTMLHELP%" (
61-
echo.
62-
echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
63-
echo.to the path to hhc.exe or download and install it from
64-
echo.http://msdn.microsoft.com/en-us/library/ms669985
65-
exit /B 1
66-
)
67-
:skiphhcsearch
6851

6952
if not defined DISTVERSION for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
7053

@@ -149,12 +132,6 @@ if "%1" EQU "htmlhelp" (
149132
)
150133
cmd /S /C "%SPHINXBUILD% %SPHINXOPTS% --builder %1 --doctree-dir build\doctrees . "%BUILDDIR%\%1" %2 %3 %4 %5 %6 %7 %8 %9"
151134

152-
if "%1" EQU "htmlhelp" (
153-
"%HTMLHELP%" "%BUILDDIR%\htmlhelp\python%DISTVERSION:.=%.hhp"
154-
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
155-
if not errorlevel 2 cmd /C exit /b 0
156-
)
157-
158135
echo.
159136
if errorlevel 1 (
160137
echo.Build failed (exit code %ERRORLEVEL%^), check for error messages

PC/layout/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,6 @@ def _c(d):
291291
continue
292292
yield dest, src
293293

294-
if ns.include_chm:
295-
for dest, src in rglob(ns.doc_build / "htmlhelp", PYTHON_CHM_NAME):
296-
yield "Doc/{}".format(dest), src
297-
298294
if ns.include_html_doc:
299295
for dest, src in rglob(ns.doc_build / "html", "**/*"):
300296
yield "Doc/html/{}".format(dest), src

PC/layout/support/appxmanifest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@
171171
),
172172
},
173173
"Help": {
174-
"Main Python Documentation": {
175-
"_condition": lambda ns: ns.include_chm,
176-
"": "[{{AppVPackageRoot}}]\\Doc\\{}".format(PYTHON_CHM_NAME),
177-
},
178174
"Local Python Documentation": {
179175
"_condition": lambda ns: ns.include_html_doc,
180176
"": "[{AppVPackageRoot}]\\Doc\\html\\index.html",

PC/layout/support/constants.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,5 @@ def check_patchlevel_version(sources):
7777
PYTHON_ZIP_NAME = "python{}{}.zip".format(VER_MAJOR, VER_MINOR)
7878
PYTHON_PTH_NAME = "python{}{}._pth".format(VER_MAJOR, VER_MINOR)
7979

80-
PYTHON_CHM_NAME = "python{}{}{}{}.chm".format(
81-
VER_MAJOR, VER_MINOR, VER_MICRO, VER_SUFFIX
82-
)
83-
8480
FREETHREADED_PYTHON_DLL_NAME = "python{}{}t.dll".format(VER_MAJOR, VER_MINOR)
8581
FREETHREADED_PYTHON_STABLE_DLL_NAME = "python{}t.dll".format(VER_MAJOR)

PC/layout/support/options.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def public(f):
3030
"appxmanifest": {"help": "an appxmanifest"},
3131
"props": {"help": "a python.props file"},
3232
"nuspec": {"help": "a python.nuspec file"},
33-
"chm": {"help": "the CHM documentation"},
3433
"html-doc": {"help": "the HTML documentation"},
3534
"freethreaded": {"help": "freethreaded binaries", "not-in-all": True},
3635
"alias": {"help": "aliased python.exe entry-point binaries"},

PC/layout/support/pymanager.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,6 @@ def calculate_install_json(ns, *, for_embed=False, for_test=False):
219219
"Name": f"{DISPLAY_NAME} {VER_DOT} Manuals{DISPLAY_SUFFIX}",
220220
"Target": r"%PREFIX%Doc\html\index.html",
221221
})
222-
elif ns.include_chm:
223-
STD_PEP514[0]["Help"]["Main Python Documentation"] = {
224-
"_": rf"%PREFIX%Doc\{PYTHON_CHM_NAME}",
225-
}
226-
STD_START[0]["Items"].append({
227-
"Name": f"{DISPLAY_NAME} {VER_DOT} Manuals{DISPLAY_SUFFIX}",
228-
"Target": "%WINDIR%hhc.exe",
229-
"Arguments": rf"%PREFIX%Doc\{PYTHON_CHM_NAME}",
230-
})
231222

232223
STD_UNINSTALL.append({
233224
"kind": "uninstall",

Tools/msi/get_externals.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ set binaries=
5353
rem We always use whatever's latest in the repo for these
5454
set binaries=%binaries% binutils
5555
set binaries=%binaries% gpg
56-
set binaries=%binaries% htmlhelp
5756
set binaries=%binaries% nuget
5857
set binaries=%binaries% redist-1
5958
set binaries=%binaries% wix-314

0 commit comments

Comments
 (0)