Browse Source

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
changes/73/72773/2
Andreas Jaeger 7 years ago
parent
commit
2943a37fc7
4 changed files with 9 additions and 6 deletions
  1. +9
    -4
      os_doc_tools/doctest.py
  2. +0
    -0
      os_doc_tools/scripts/build-ha-guide.sh
  3. +0
    -0
      os_doc_tools/scripts/markdown-docbook.sh
  4. +0
    -2
      setup.cfg

+ 9
- 4
os_doc_tools/doctest.py View File

@ -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)


bin/build-ha-guide.sh → os_doc_tools/scripts/build-ha-guide.sh View File


bin/markdown-docbook.sh → os_doc_tools/scripts/markdown-docbook.sh View File


+ 0
- 2
setup.cfg View File

@ -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/*


Loading…
Cancel
Save