From 2943a37fc735c07bee224c356d74749ad26283fe Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 11 Feb 2014 22:21:51 +0100 Subject: [PATCH] Do not install internal scripts in /usr/bin build-ha-guide.sh and markdown-docbook.sh are only needed by doctest.py, so make them only available to that tool. There's no need to install these files in /usr/bin. Change-Id: Idd2f40dbe0a50a0936311574a26553444a4dd7e1 --- os_doc_tools/doctest.py | 13 +++++++++---- {bin => os_doc_tools/scripts}/build-ha-guide.sh | 0 {bin => os_doc_tools/scripts}/markdown-docbook.sh | 0 setup.cfg | 2 -- 4 files changed, 9 insertions(+), 6 deletions(-) rename {bin => os_doc_tools/scripts}/build-ha-guide.sh (100%) rename {bin => os_doc_tools/scripts}/markdown-docbook.sh (100%) diff --git a/os_doc_tools/doctest.py b/os_doc_tools/doctest.py index ba2e8775..dab71854 100755 --- a/os_doc_tools/doctest.py +++ b/os_doc_tools/doctest.py @@ -74,12 +74,15 @@ KNOWN_AUDIENCE_VALUES = ["enduser", "installer", "webpage"] -BASE_RNG = os.path.join(os.path.dirname(__file__), 'resources/') +os_doc_tools_dir = os.path.dirname(__file__) +BASE_RNG = os.path.join(os_doc_tools_dir, 'resources') RACKBOOK_RNG = os.path.join(BASE_RNG, 'rackbook.rng') DOCBOOKXI_RNG = os.path.join(BASE_RNG, 'docbookxi.rng') WADL_RNG = os.path.join(BASE_RNG, 'wadl.rng') WADL_XSD = os.path.join(BASE_RNG, 'wadl.xsd') +SCRIPTS_DIR = os.path.join(os_doc_tools_dir, 'scripts') + # NOTE(berendt): check_output as provided in Python 2.7.5 to make script # usable with Python < 2.7 @@ -746,7 +749,7 @@ def build_book(book, publish_path, log_path): base_book = "install-guide (for Debian, Fedora, openSUSE, Ubuntu)" elif base_book == "high-availability-guide": output = subprocess.check_output( - ["build-ha-guide.sh", ], + [os.path.join(SCRIPTS_DIR, 'build-ha-guide.sh'), ], stderr=subprocess.STDOUT ) output = subprocess.check_output( @@ -757,7 +760,8 @@ def build_book(book, publish_path, log_path): # Let's not check for "v3" but for the full name instead elif book.endswith("openstack-identity-api/v3"): output = subprocess.check_output( - ["markdown-docbook.sh", "identity-api-v3"], + [os.path.join(SCRIPTS_DIR, "markdown-docbook.sh"), + "identity-api-v3"], stderr=subprocess.STDOUT ) out_file.write(output) @@ -771,7 +775,8 @@ def build_book(book, publish_path, log_path): # Repository: image-api elif book.endswith('openstack-image-service-api/src/markdown'): output = subprocess.check_output( - ["markdown-docbook.sh", "image-api-v2.0"], + [os.path.join(SCRIPTS_DIR, "markdown-docbook.sh"), + "image-api-v2.0"], stderr=subprocess.STDOUT ) out_file.write(output) diff --git a/bin/build-ha-guide.sh b/os_doc_tools/scripts/build-ha-guide.sh similarity index 100% rename from bin/build-ha-guide.sh rename to os_doc_tools/scripts/build-ha-guide.sh diff --git a/bin/markdown-docbook.sh b/os_doc_tools/scripts/markdown-docbook.sh similarity index 100% rename from bin/markdown-docbook.sh rename to os_doc_tools/scripts/markdown-docbook.sh diff --git a/setup.cfg b/setup.cfg index b111cfd1..d2f4c017 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,10 +22,8 @@ packages = os_doc_tools autogenerate_config_docs scripts = - bin/build-ha-guide.sh bin/generatedocbook bin/generatepot - bin/markdown-docbook.sh data_files = share/openstack-doc-tools/sitemap = sitemap/* share/openstack-doc-tools/cleanup = cleanup/*