Usage¶
Installation¶
python3 -m pip install seed_intersphinx_mapping --user
First add the required channels
conda config --add channels https://conda.anaconda.org/conda-forge
conda config --add channels https://conda.anaconda.org/domdfcoding
Then install
conda install seed_intersphinx_mapping
python3 -m pip install git+https://github.com/sphinx-toolbox/seed_intersphinx_mapping@master --user
Enable seed_intersphinx_mapping by adding the following
to the extensions variable in your conf.py:
extensions = [
...
'seed_intersphinx_mapping',
]
For more information see https://www.sphinx-doc.org/en/master/usage/extensions#third-party-extensions .
Configuration¶
-
pkg_requirements_source¶ The requirements source. This may be one of:
A list of directories (relative to
repository_root) in which to search forrequirements.txtfiles. Any files found will be used to compile the list of requirements.The string
'requirements'. The list of requirements will be determined from therequirements.txtfile in the directory given by therepository_rootoption.The string
'pyproject'(or'pyproject.toml'). The list will be parsed from the[project.dependencies]table of thepyproject.tomlfile in therepository_root.See also
PEP 621 – Storing project metadata in pyproject.toml
The string
'flit'. The list will be parsed from the[tool.flit.metadata.requires]table of thepyproject.tomlfile in therepository_root.
-
repository_root¶ The path to the repository root, relative to the Sphinx source directory.
E.g., for this repository structure:
. ├── LICENSE ├── README.rst ├── doc-source # <- this is the Sphinx source directory │ ├── index.rst │ └── conf.py ├── requirements.txt # <- this is the file containing the requirements ├── seed_intersphinx_mapping │ └── __init__.py ├── setup.py ├── tests └── tox.ini
the value would be
'..', which is the default.
Caching¶
seed_intersphinx_mapping caches the documentation URLs for PyPI packages.
The cache can be cleared as follows:
python3 -m seed_intersphinx_mapping