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
This commit is contained in:
Andreas Jaeger 2014-02-11 22:21:51 +01:00
parent aa10660f25
commit 2943a37fc7
4 changed files with 9 additions and 6 deletions

View File

@ -74,12 +74,15 @@ KNOWN_AUDIENCE_VALUES = ["enduser",
"installer", "installer",
"webpage"] "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') RACKBOOK_RNG = os.path.join(BASE_RNG, 'rackbook.rng')
DOCBOOKXI_RNG = os.path.join(BASE_RNG, 'docbookxi.rng') DOCBOOKXI_RNG = os.path.join(BASE_RNG, 'docbookxi.rng')
WADL_RNG = os.path.join(BASE_RNG, 'wadl.rng') WADL_RNG = os.path.join(BASE_RNG, 'wadl.rng')
WADL_XSD = os.path.join(BASE_RNG, 'wadl.xsd') 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 # NOTE(berendt): check_output as provided in Python 2.7.5 to make script
# usable with Python < 2.7 # 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)" base_book = "install-guide (for Debian, Fedora, openSUSE, Ubuntu)"
elif base_book == "high-availability-guide": elif base_book == "high-availability-guide":
output = subprocess.check_output( output = subprocess.check_output(
["build-ha-guide.sh", ], [os.path.join(SCRIPTS_DIR, 'build-ha-guide.sh'), ],
stderr=subprocess.STDOUT stderr=subprocess.STDOUT
) )
output = subprocess.check_output( 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 # Let's not check for "v3" but for the full name instead
elif book.endswith("openstack-identity-api/v3"): elif book.endswith("openstack-identity-api/v3"):
output = subprocess.check_output( output = subprocess.check_output(
["markdown-docbook.sh", "identity-api-v3"], [os.path.join(SCRIPTS_DIR, "markdown-docbook.sh"),
"identity-api-v3"],
stderr=subprocess.STDOUT stderr=subprocess.STDOUT
) )
out_file.write(output) out_file.write(output)
@ -771,7 +775,8 @@ def build_book(book, publish_path, log_path):
# Repository: image-api # Repository: image-api
elif book.endswith('openstack-image-service-api/src/markdown'): elif book.endswith('openstack-image-service-api/src/markdown'):
output = subprocess.check_output( 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 stderr=subprocess.STDOUT
) )
out_file.write(output) out_file.write(output)

View File

@ -22,10 +22,8 @@ packages =
os_doc_tools os_doc_tools
autogenerate_config_docs autogenerate_config_docs
scripts = scripts =
bin/build-ha-guide.sh
bin/generatedocbook bin/generatedocbook
bin/generatepot bin/generatepot
bin/markdown-docbook.sh
data_files = data_files =
share/openstack-doc-tools/sitemap = sitemap/* share/openstack-doc-tools/sitemap = sitemap/*
share/openstack-doc-tools/cleanup = cleanup/* share/openstack-doc-tools/cleanup = cleanup/*