From 965ca663a1bc23a4e15a0b381d3b515702c6b926 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 30 Mar 2021 20:53:33 +0200 Subject: Fix --asciidoc for mkvenv.py (cherry picked from commit ed49bdd9a4c15aea9e194a5ca8a199a22ecdbd9f) --- scripts/mkvenv.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/mkvenv.py b/scripts/mkvenv.py index a3b3bf32d..51b10d254 100755 --- a/scripts/mkvenv.py +++ b/scripts/mkvenv.py @@ -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' -- cgit v1.2.3-54-g00ecf