I
I
Igor Cherny2021-07-07 11:46:59
Python
Igor Cherny, 2021-07-07 11:46:59

How to add an exstensions section for Sphinx if there is no setup.py in the project (only setup.cfg and pyproject.toml)?

according to the Sphinx documentation I have to add to setup.py :

extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc']

otherwise I get error Unknown directive type “automodule” or “autoclass"
But I don't have setup.py , only setup.cfg and pyproject.toml and I didn't find how extensions are defined in setup.cfg , can I do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
javedimka, 2021-07-07
@javedimka

According to the Sphinx documentation, you should add extensions to the conf.py file , not to any other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question