[stable-2.14] Remove docs dir dependency from man page build (#81003) (#81023)

* [stable-2.14] Remove docs dir dependency from man page build (#81003)
(cherry picked from commit b3f1290bcd)

Co-authored-by: Matt Clay <matt@mystile.com>

* Update path in Makefile
pull/81026/head
Matt Clay 1 year ago committed by GitHub
parent fb91d25257
commit 2918785895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,6 +49,7 @@ include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
recursive-include hacking/build_library *.py
include hacking/build-ansible.py
include hacking/templates/*.j2
include hacking/test-module.py
include hacking/update-sanity-requirements.py
include bin/*

@ -146,7 +146,7 @@ changelog:
.PHONY: generate_rst
generate_rst: lib/ansible/cli/*.py
mkdir -p ./docs/man/man1/ ; \
$(PYTHON) $(GENERATE_CLI) --template-file=docs/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
$(PYTHON) $(GENERATE_CLI) --template-file=hacking/templates/man.j2 --output-dir=docs/man/man1/ --output-format man lib/ansible/cli/*.py
.PHONY: docs
docs: generate_rst

@ -0,0 +1,2 @@
bugfixes:
- man page build - Remove the dependency on the ``docs`` directory for building man pages.

@ -21,7 +21,7 @@ from ..change_detection import update_file_if_different # pylint: disable=relat
from ..commands import Command # pylint: disable=relative-beyond-top-level
DEFAULT_TEMPLATE_FILE = pathlib.Path(__file__).parents[4] / 'docs/templates/man.j2'
DEFAULT_TEMPLATE_FILE = pathlib.Path(__file__).parents[4] / 'hacking/templates/man.j2'
# from https://www.python.org/dev/peps/pep-0257/

@ -79,7 +79,6 @@ def _generate_rst_in_templates() -> t.Iterable[Path]:
sys.executable,
'hacking/build-ansible.py',
'generate-man',
'--template-file=docs/templates/man.j2',
'--output-dir=docs/man/man1/',
'--output-format=man',
*Path('lib/ansible/cli/').glob('*.py'),

Loading…
Cancel
Save