readthedocs / sphinx-notfound-page

Create a custom 404 page with absolute URLs hardcoded
https://sphinx-notfound-page.readthedocs.io/
MIT License
48 stars 32 forks source link

pip-compile totaly ignore sphinx-notfound-page from conf.py #239

Open Hierosme opened 1 month ago

Hierosme commented 1 month ago

Best sphinx publication warning a lot about fixe version of package use for generate the documentation. For that pip-compile is the way.

Unfortunatlly i have to add sphinx-notfound-page because the commande

pip-compile --extra=doc --output-file=docs/requirements.txt pyproject.toml

Do not add sphinx-notfound-page inside docs/requirements.txt .txt

Here my conf.py import;

extensions = [
    'sphinx.ext.autodoc',
    'autoapi.extension',
    'sphinx.ext.intersphinx',
    'sphinx.ext.coverage',
    'sphinx.ext.doctest',
    'sphinx.ext.extlinks',
    'notfound.extension',
    'sphinxemoji.sphinxemoji',
]

The workarround is to declare pyproject.toml

[project.optional-dependencies]
doc = [
    "sphinx-rtd-theme",
    "sphinxemoji",
    "sphinx-autoapi",
    "sphinx-notfound-page",
]

I dont know why sphinx do not detect sphinx-notfound-page from conf.py

I dont know if a issue should be open on sphinx project or if a file should be edit inside sphinx-notfound-page project.

Regards