[autohelp] misc fixes
- wrapper: upgrade setuptools in the generated venvs - swift: read from docbook on liberty - swift: ignore :ref: directives - swift: remove a bogus sys.exit(0) Change-Id: If983da606e51f39c9e331aa27c3e3598abc695fe
This commit is contained in:
parent
0c96872119
commit
5c930e29bd
@ -63,7 +63,7 @@ activate_venv() {
|
||||
project=$1
|
||||
|
||||
. $VENVDIR/$project/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade pip setuptools
|
||||
}
|
||||
|
||||
get_project() {
|
||||
|
@ -83,6 +83,8 @@ def get_options(project, branch, args):
|
||||
cmd = ("python extract_swift_flags.py dump "
|
||||
"-s %(sources)s/swift -m %(sources)s/openstack-manuals" %
|
||||
{'sources': args.sources})
|
||||
if branch == 'stable/liberty':
|
||||
cmd += " -f docbook"
|
||||
repo_path = args.sources
|
||||
else:
|
||||
packages = _get_packages(project, branch)
|
||||
@ -215,11 +217,13 @@ def get_env(project, new_branch, old_list, new_list):
|
||||
for name in sorted(new_opts, _cmpopts):
|
||||
opt = new_list[name][1]
|
||||
name = format_option_name(name)
|
||||
helptext = opt['help'].strip().replace('\n', ' ')
|
||||
helptext = ' '.join(helptext.split())
|
||||
cells = (("%(name)s = %(default)s" %
|
||||
{'name': name,
|
||||
'default': opt['default']}).strip(),
|
||||
"(%(type)s) %(help)s" % {'type': opt['type'],
|
||||
'help': opt['help']})
|
||||
'help': helptext})
|
||||
env['new_opts'].append(cells)
|
||||
|
||||
# New defaults
|
||||
|
@ -86,7 +86,7 @@ def get_existing_options_from_rst(optfiles):
|
||||
"""Parse an existing RST table to compile a list of existing options."""
|
||||
options = {}
|
||||
for optfile in optfiles:
|
||||
input_string = open(optfile).read()
|
||||
input_string = open(optfile).read().replace(':ref:', '')
|
||||
output, pub = core.publish_programmatically(
|
||||
source_class=io.StringInput, source=input_string,
|
||||
source_path=optfile, destination_class=io.NullOutput,
|
||||
@ -114,7 +114,7 @@ def get_existing_options(optfiles):
|
||||
for optfile in optfiles:
|
||||
if optfile.endswith('/swift-conf-changes.xml'):
|
||||
continue
|
||||
xml = etree.fromstring(open(optfile).read())
|
||||
xml = etree.fromstring(open(optfile).read().replace(':ref:', ''))
|
||||
tbody = xml.find(DBK_NS + "tbody")
|
||||
trlist = tbody.findall(DBK_NS + "tr")
|
||||
for tr in trlist:
|
||||
@ -224,8 +224,6 @@ def read_options(swift_repo, manuals_repo, read_from, verbose):
|
||||
options = get_existing_options(
|
||||
glob.glob(manuals_repo + '/doc/common/tables/swift*xml'))
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
option_descs = extract_descriptions_from_devref(swift_repo, options)
|
||||
conf_samples = glob.glob(swift_repo + '/etc/*conf-sample')
|
||||
for sample in conf_samples:
|
||||
|
Loading…
Reference in New Issue
Block a user