repo/gentoo:master commit in: dev-python/typer/

Michał Górny <[email protected]> Tue, 04 Aug 2026 07:44:07 +0000 (UTC)
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1785829442.4ed5e9283ef1243b904ebdb9b3ad213b02756c64.mgorny@gentoo>
commit:     4ed5e9283ef1243b904ebdb9b3ad213b02756c64
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 05:40:15 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 07:44:02 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ed5e928

dev-python/typer: Bump to 0.27.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/typer/Manifest            |  1 +
 dev-python/typer/typer-0.27.1.ebuild | 71 ++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/dev-python/typer/Manifest b/dev-python/typer/Manifest
index b60031edb26e..9f2f45a21fd8 100644
--- a/dev-python/typer/Manifest
+++ b/dev-python/typer/Manifest
@@ -1,2 +1,3 @@
 DIST typer-0.26.8.tar.gz 202097 BLAKE2B efe6413355b2db0cb8f4c6b2692ca9d5ec7fc89f789163711001ced9688337ff80b1ff351dfb6b55c42c9b301ef48f184b3bbdbd9ba636e7fcf3d733de773d95 SHA512 5550332a799655e25c85ee70f4904c4b0f8f6942c9815c09e10c2b3f5d0a9663165e78bb6b8bfaad5498b55bfd4e63abd5d733bd96cf1c05f2abc0e9adb32c18
 DIST typer-0.27.0.tar.gz 203430 BLAKE2B 316364c78fd7c0bdbbc72023f25bb15d9f8be8bf106e4329e487cd70f559010f04a63f08a79d7c604e0e726ff060e88c68114b1607c8f56a82ec3b01255e3341 SHA512 c028271118a6a3345f61d73c4633729cfb004eeeff2c88fb8f5fe07915f7a11cbd2ef7bc1fe3232e108ca61c4d4f3c32f9f9de7b022cb1c27f925449163eb9ab
+DIST typer-0.27.1.tar.gz 203994 BLAKE2B 7d74fcaa91d38a7071cd8b6c55bdee48e61ac88b4b2c49a51d566edef916a59f919d9efc47e179a8234d5e8793f5e0ae5f4b5e97249a82813d277e63dd7ccaf8 SHA512 f2afcc7caaa611d4c11fed82b71dcf7b126f06bb7d3838fca515a8f104045590ca5eec795fdf0e9f3b3604ec06a96ecfb717df8f4f23fde52b1f515b3d34c75f

diff --git a/dev-python/typer/typer-0.27.1.ebuild b/dev-python/typer/typer-0.27.1.ebuild
new file mode 100644
index 000000000000..ec0342fcde6a
--- /dev/null
+++ b/dev-python/typer/typer-0.27.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=pdm-backend
+PYTHON_COMPAT=( python3_{12..15} )
+
+inherit distutils-r1 shell-completion pypi
+
+DESCRIPTION="Build great CLIs. Easy to code. Based on Python type hints"
+HOMEPAGE="
+	https://typer.tiangolo.com/
+	https://github.com/fastapi/typer/
+	https://pypi.org/project/typer/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="cli"
+
+RDEPEND="
+	>=dev-python/annotated-doc-0.0.2[${PYTHON_USEDEP}]
+	>=dev-python/rich-13.8.0[${PYTHON_USEDEP}]
+	>=dev-python/shellingham-1.3.0[${PYTHON_USEDEP}]
+	cli? ( !dev-lang/erlang )
+"
+BDEPEND="
+	test? (
+		dev-python/coverage[${PYTHON_USEDEP}]
+	)
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+	distutils-r1_src_prepare
+
+	# LLM crap
+	rm -r typer/.agents || die
+	if ! use cli; then
+		sed -i -e '/typer\.cli/d' pyproject.toml || die
+	fi
+}
+
+python_test() {
+	# See scripts/tests.sh
+	local -x TERMINAL_WIDTH=3000
+	local -x _TYPER_FORCE_DISABLE_TERMINAL=1
+	local -x _TYPER_RUN_INSTALL_COMPLETION_TESTS=1
+
+	# needed to import tests.util somewhere deep in tests
+	local -x PYTHONPATH=${S}
+
+	epytest
+}
+
+python_install() {
+	if use cli && [[ ! ${COMPLETIONS_INSTALLED} ]]; then
+		local -x _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1
+		newbashcomp - typer < <(typer --show-completion bash || die)
+		newzshcomp - typer < <(typer --show-completion zsh || die)
+		newfishcomp - typer < <(typer --show-completion fish || die)
+		COMPLETIONS_INSTALLED=1
+	fi
+
+	distutils-r1_python_install
+}