From 61f3c0eb33e5b40554aa253f3a01b0da45e17ce8 Mon Sep 17 00:00:00 2001 From: odrling Date: Fri, 5 Apr 2024 22:00:31 +0200 Subject: [PATCH] dev-python/typer: fix tests tests don't pass without shell detection --- dev-python/typer/typer-0.12.1.ebuild | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dev-python/typer/typer-0.12.1.ebuild b/dev-python/typer/typer-0.12.1.ebuild index df2aca1..306a94f 100644 --- a/dev-python/typer/typer-0.12.1.ebuild +++ b/dev-python/typer/typer-0.12.1.ebuild @@ -47,15 +47,18 @@ src_test() { distutils-r1_src_test "${@}" } +typer_gen_comp() { + python -m typer --show-completion bash > "${COMPLETIONSDIR}/${PN}" + python -m typer --show-completion zsh > "${COMPLETIONSDIR}/_${PN}" + python -m typer --show-completion fish > "${COMPLETIONSDIR}/${PN}.fish" +} + src_compile() { distutils-r1_src_compile "${@}" mkdir "${COMPLETIONSDIR}" - export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 - python -m typer --show-completion bash > "${COMPLETIONSDIR}/${PN}" - python -m typer --show-completion zsh > "${COMPLETIONSDIR}/_${PN}" - python -m typer --show-completion fish > "${COMPLETIONSDIR}/${PN}.fish" + _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 typer_gen_comp } src_install() {