From b3f1290bcdc28a4b5d6d859ff4346ea0784c3ca1 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 8 Jun 2023 12:41:45 -0700 Subject: [PATCH] Remove docs dir dependency from man page build (#81003) --- MANIFEST.in | 1 + changelogs/fragments/man-page-build-docs-dependency.yml | 2 ++ .../build_library/build_ansible/command_plugins/generate_man.py | 2 +- {docs => hacking}/templates/man.j2 | 0 packaging/pep517_backend/_backend.py | 1 - 5 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/man-page-build-docs-dependency.yml rename {docs => hacking}/templates/man.j2 (100%) diff --git a/MANIFEST.in b/MANIFEST.in index d4a64e1520e..21a64691f52 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,6 +7,7 @@ include examples/hosts include examples/scripts/ConfigureRemotingForAnsible.ps1 include examples/scripts/upgrade_to_ps3.ps1 include hacking/build-ansible.py +include hacking/templates/*.j2 include hacking/test-module.py include hacking/update-sanity-requirements.py include licenses/*.txt diff --git a/changelogs/fragments/man-page-build-docs-dependency.yml b/changelogs/fragments/man-page-build-docs-dependency.yml new file mode 100644 index 00000000000..3433785f3ca --- /dev/null +++ b/changelogs/fragments/man-page-build-docs-dependency.yml @@ -0,0 +1,2 @@ +bugfixes: + - man page build - Remove the dependency on the ``docs`` directory for building man pages. diff --git a/hacking/build_library/build_ansible/command_plugins/generate_man.py b/hacking/build_library/build_ansible/command_plugins/generate_man.py index 2d8d1b0ec4c..4228c48b4df 100644 --- a/hacking/build_library/build_ansible/command_plugins/generate_man.py +++ b/hacking/build_library/build_ansible/command_plugins/generate_man.py @@ -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/ diff --git a/docs/templates/man.j2 b/hacking/templates/man.j2 similarity index 100% rename from docs/templates/man.j2 rename to hacking/templates/man.j2 diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py index f7c9226655b..cb7e365aa7a 100644 --- a/packaging/pep517_backend/_backend.py +++ b/packaging/pep517_backend/_backend.py @@ -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'),