Fix --asciidoc for mkvenv.py

This commit is contained in:
Florian Bruhin 2021-03-30 20:53:33 +02:00
parent aea69ff3df
commit ed49bdd9a4
1 changed files with 5 additions and 7 deletions

View File

@ -80,10 +80,9 @@ def parse_args(argv: List[str] = None) -> argparse.Namespace:
parser.add_argument('--virtualenv',
action='store_true',
help="Use virtualenv instead of venv.")
parser.add_argument('--asciidoc', help="Full path to python and "
"asciidoc.py. If not given, it's searched in PATH.",
nargs=2, required=False,
metavar=('PYTHON', 'ASCIIDOC'))
parser.add_argument('--asciidoc', help="Full path to asciidoc.py. "
"If not given, asciidoc is searched in PATH.",
nargs='?',)
parser.add_argument('--dev',
action='store_true',
help="Also install dev/test dependencies.")
@ -395,12 +394,11 @@ def install_qutebrowser(venv_dir: pathlib.Path) -> None:
pip_install(venv_dir, '-e', str(REPO_ROOT))
def regenerate_docs(venv_dir: pathlib.Path,
asciidoc: Optional[Tuple[str, str]]):
def regenerate_docs(venv_dir: pathlib.Path, asciidoc: Optional[str]):
"""Regenerate docs using asciidoc."""
utils.print_title("Generating documentation")
if asciidoc is not None:
a2h_args = ['--asciidoc'] + asciidoc
a2h_args = ['--asciidoc', asciidoc]
else:
a2h_args = []
script_path = pathlib.Path(__file__).parent / 'asciidoc2html.py'