New get-deps command: infer PyPI depedencies from mkdocs.yml

The user story is that the following command should let you "just build" any MkDocs site:

    pip install $(mkdocs get-deps) && mkdocs build

This cross-references 2 files:

* mkdocs.yml - `theme`, `plugins`, `markdown_extensions`
* projects.yaml - a registry of all popular MkDocs-related projects and which entry points they provide - downloaded on the fly

-and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
This commit is contained in:
Oleh Prypin
2023-04-29 10:45:38 +02:00
parent ea1c6c468d
commit 36205e30dd
4 changed files with 223 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ dependencies = [
"typing_extensions >=3.10; python_version < '3.8'",
"packaging >=20.5",
"mergedeep >=1.3.4",
"platformdirs >=2.2.0",
"colorama >=0.4; platform_system == 'Windows'",
]
[project.optional-dependencies]
@@ -63,6 +64,7 @@ min-versions = [
"typing_extensions ==3.10; python_version < '3.8'",
"packaging ==20.5",
"mergedeep ==1.3.4",
"platformdirs ==2.2.0",
"colorama ==0.4; platform_system == 'Windows'",
"babel ==2.9.0",
]