PYTHON = python3
VENVDIR = ./venv
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
+SPHINXLINT = PATH=$(VENVDIR)/bin:$$PATH sphinx-lint
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
PAPER =
SOURCES =
rm dist/python-$(DISTVERSION)-docs-texinfo.tar
check:
- $(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst
- $(PYTHON) tools/rstlint.py ../Misc/NEWS.d/next/
+ $(SPHINXLINT) -i tools -i $(VENVDIR) -i README.rst
+ $(SPHINXLINT) ../Misc/NEWS.d/next/
serve:
$(PYTHON) ../Tools/scripts/serve.py build/html $(SERVE_PORT)
set BLURB=%PYTHON% -m blurb
)
+if not defined SPHINXLINT (
+ %PYTHON% -c "import sphinxlint" > nul 2> nul
+ if errorlevel 1 (
+ echo Installing sphinx-lint with %PYTHON%
+ %PYTHON% -m pip install sphinx-lint
+ if errorlevel 1 exit /B
+ )
+ set SPHINXLINT=%PYTHON% -m sphinxlint
+)
+
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
if exist "%HTMLHELP%" goto :skiphhcsearch
goto end
:check
-cmd /S /C "%PYTHON% tools\rstlint.py -i tools"
+cmd /S /C "%SPHINXLINT% -i tools"
goto end
:serve
blurb
+sphinx-lint<1
+
# The theme used by the documentation is stored separately, so we need
# to install that as well.
python-docs-theme>=2022.1
count = defaultdict(int)
+ print("""⚠ rstlint.py is no longer maintained here and will be removed
+⚠ in a future release.
+⚠ Please use https://pypi.org/p/sphinx-lint instead.
+""")
+
for root, dirs, files in os.walk(path):
# ignore subdirs in ignore list
if abspath(root) in ignore:
--- /dev/null
+``Doc/tools/rstlint.py`` has moved to its own repository and is now packaged
+on PyPI as ``sphinx-lint``.
-In :func:`typing.get_type_hints`, support evaluating bare stringified ``TypeAlias`` annotations. Patch by Gregory Beauregard.
\ No newline at end of file
+In :func:`typing.get_type_hints`, support evaluating bare stringified ``TypeAlias`` annotations. Patch by Gregory Beauregard.