sphinx-contrib / sphinxcontrib-towncrier

An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version. Demo: https://ansible-pylibssh.rtfd.io/changelog. Docs: https://sphinxcontrib-towncrier.rtfd.io
https://pypi.org/p/sphinxcontrib-towncrier
BSD 3-Clause "New" or "Revised" License
19 stars 18 forks source link

0.2.0a0: problem with build setuptools documentation #54

Closed kloczek closed 3 years ago

kloczek commented 3 years ago

I,m trying to build setuptools documentation as man page. setuoptools has project.toml file in its root directory however look slikesphinxcontrib-towncrier` has some difficulties with find that file.

[tkloczko@barrel setuptools-57.2.0]$ SETUPTOOLS_SCM_PRETEND_VERSION=57.2.0 /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx                           running build_sphinx
Running Sphinx v4.1.2
loading intersphinx inventory from https://pypa-build.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.python.org/2/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment:
Extension error (sphinxcontrib.towncrier):
Handler <bound method TowncrierDraftEntriesEnvironmentCollector.get_outdated_docs of <sphinxcontrib.towncrier.TowncrierDraftEntriesEnvironmentCollector object at 0x7f399716ae80>> for event 'env-get-outdated' threw an exception (exception: [Errno 2] No such file or directory: '../pyproject.toml')
[tkloczko@barrel setuptools-57.2.0]$
webknjaz commented 3 years ago

It works for setuptools as proven by the docs site being published on RTD automatically. Just invoke Sphinx as they do.