repo/gentoo:master commit in: dev-util/ruff/

"Patrick McLean" <[email protected]> Wed, 05 Aug 2026 14:55:53 +0000 (UTC)
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1785941745.08516335576f68005b2e8f7f5d85f0a399786656.chutzpah@gentoo>
commit:     08516335576f68005b2e8f7f5d85f0a399786656
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  5 14:55:28 2026 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Aug  5 14:55:45 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08516335

dev-util/ruff: add 0.16.1

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-util/ruff/Manifest           |   2 +
 dev-util/ruff/ruff-0.16.1.ebuild | 111 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)

diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest
index 9d8c8d578a22..0e12511ec6f4 100644
--- a/dev-util/ruff/Manifest
+++ b/dev-util/ruff/Manifest
@@ -16,5 +16,7 @@ DIST ruff-0.15.22-crates.tar.xz 28557892 BLAKE2B fdad14454e619d877ae3bc928f3fdef
 DIST ruff-0.15.22.gh.tar.gz 12456801 BLAKE2B 2dcadb76ef927f596d66b5805029368612ca7ec5b6ade5ecc11a59630a02943178c2f28bbbddecc04ef85a4850a58eb2e19e1d33363aef5198c052ec0f360a29 SHA512 eb76b898d49e8299e67df695d5329e39352fd7c90aeebdb6ff6b5867d5ef675448296a0207376adb53f9d51de22316c3b96d58e990be72c30a10047b7db0ea7d
 DIST ruff-0.16.0-crates.tar.xz 28626012 BLAKE2B 7a1a982c57f9aebcedf8c9a4b4f4dba188a6d4b850252788db54ee1332886b3aafb4374db87474b2ea695933c9c92da5b0eeb7c2ea7ca4c9c53a213b030769f5 SHA512 d53c6f31b468bcb0333bb1905a53beb80b511cc014a3b676a94f64aee87958cc93d074914b98ab9a6e759a930464a0cc89fe338131a2a78032dd7fd415a85e15
 DIST ruff-0.16.0.gh.tar.gz 12533164 BLAKE2B bdcaf82830abeb4b8af9d470df9b37a48df3095eab274ee4b767dbdd20503f47da0fe0c6aac492d10d56b894fa1a0521f1055239a9bbed6aeed3bf92ed513ff4 SHA512 55b2140104ff48c9c45bc8dd8e71c5e975a2099e00dc41d69cd1ef7887672c6704c3a239c727b1d0c84b425b1e0e0b394def2e0638000a43f558b7a0e8bf6f85
+DIST ruff-0.16.1-crates.tar.xz 28659240 BLAKE2B 119a6395d66c4bac93761180cc729e4aad3bb87f6f8dc8ebe049743c2c8ed91bf47441dbe7426ba717dc83bf5d19711efafa27a0187033cf766d7d966d367816 SHA512 d9781f1c024f7021bc0f09b51cadfda45eee29e82f39164e57bd48bc19b64d9611296ee9c30ac6af49741816fb2a9365b85fd6461e01acfca6e8de20be132e5c
+DIST ruff-0.16.1.gh.tar.gz 12733382 BLAKE2B 3296aef4902f375250fd19cfef80101bafd6acb5c9771ac3138d9c8560137d93d3cb1d434e74ec3a00387d22c3308942fd799e550d6d2b618bfb711319abcb7b SHA512 ed7d691fd755264202cb80276f12b0eef78682c6a0e1badfb2735d2451a10f707e0188a06bbe6494594f10f45c6d5ccaf6eda891754e0d79cc2367b75ba629cc
 DIST salsa-55e5e7d32fa3fc189276f35bb04c9438f9aedbd1.gh.tar.gz 731425 BLAKE2B ce720abaa295b46c7e1fa06a73e2ad9a48a6b9da7f2b4a91edba38a28bb9a63a1661886fc7c5d6dbc915f589f2e055731a544cdf18afb4dd7b3f6815c59e543b SHA512 91942cfc6bbfb7f07366cdd3d42e5296bff877ee723b24868ff3c278defd0ef247f03e957332bc0696553f0f1977a41c18d08efe7887f5bda3a1cb98543bddbd
 DIST salsa-9860ff6ca0f1f8f3a8d6b832020002790b501254.gh.tar.gz 738416 BLAKE2B a80aea2f5e89bbadd5aecd7bf728355f2ffd84793b2e3581e94ba10e32c68fa7b9eb2663b17e47089ba60f5b6019776f794f91771435a9e8d10876f4e38b4d97 SHA512 ed1080daa458a77dc1634381863c671f3facd34e048c952358253be950bc87eb4d11079566be8caa90eb1f704e1dbc3591418a03ed10f1b7147222afcf44fe63

diff --git a/dev-util/ruff/ruff-0.16.1.ebuild b/dev-util/ruff/ruff-0.16.1.ebuild
new file mode 100644
index 000000000000..fe46867af3c0
--- /dev/null
+++ b/dev-util/ruff/ruff-0.16.1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 2024-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Autogenerated by pycargoebuild 0.15.1
+
+EAPI=8
+
+CRATES="
+"
+
+RUST_MIN_VER="1.95"
+
+inherit shell-completion cargo
+
+DESCRIPTION="An extremely fast Python linter, written in Rust"
+HOMEPAGE="
+	https://docs.astral.sh/ruff/
+	https://github.com/astral-sh/ruff
+"
+SRC_URI="
+	${CARGO_CRATE_URIS}
+	https://github.com/astral-sh/ruff/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz
+	https://github.com/gentoo-crate-dist/${PN}/releases/download/${PV}/${P}-crates.tar.xz
+"
+
+LICENSE="MIT"
+# Dependent crate licenses
+LICENSE+="
+	Apache-2.0 BSD CC0-1.0 ISC MIT MPL-2.0 PSF-2 Unicode-3.0
+	Unicode-DFS-2016 WTFPL-2 ZLIB
+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
+
+RDEPEND="
+	!elibc_musl? ( !elibc_Darwin? ( !elibc_bionic? ( dev-libs/jemalloc:= ) ) )
+	app-arch/zstd
+"
+DEPEND="
+	${RDEPEND}
+"
+
+QA_FLAGS_IGNORED="usr/bin/.*"
+
+DOCS=(
+	BREAKING_CHANGES.md
+	CONTRIBUTING.md
+	README.md
+	assets
+	docs
+)
+
+src_prepare() {
+	default
+
+	# Experimental cruft cleaner. These crates are not used by the ruff binary,
+	# and when they are removed in the git repo, the lockfile is regenerated
+	# and gets quite a bit smaller. Hence pycargoebuild also produces much
+	# smaller CRATES= variables. Less for the user to download, fewer distfiles
+	# to mirror.
+	pushd crates >/dev/null || die
+	rm -r ruff_{benchmark,dev} ty{,_{server,completion_eval}} *_wasm || die
+	popd > /dev/null || die
+
+	# tests that hang in the ebuild environment
+	rm crates/ruff_annotate_snippets/tests/examples.rs || die
+}
+
+src_configure() {
+	export RUSTFLAGS="${RUSTFLAGS}"
+	cargo_src_configure
+}
+
+src_compile() {
+	local -x ZSTD_SYS_USE_PKG_CONFIG=1
+	# Gentoo bug #927338
+	if use !elibc_musl && use !elibc_Darwin && use !elibc_bionic; then
+		local -x CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1
+		local -x JEMALLOC_OVERRIDE="${ESYSROOT}/usr/$(get_libdir)"/libjemalloc.so
+	fi
+	cargo_src_compile --bin ruff
+
+	local releasedir
+	releasedir=$(cargo_target_dir)
+
+	${releasedir}/ruff generate-shell-completion bash > ruff-completion.bash || die
+	${releasedir}/ruff generate-shell-completion fish > ruff-completion.fish || die
+	${releasedir}/ruff generate-shell-completion zsh > ruff-completion.zsh || die
+}
+
+src_test() {
+	local -x ZSTD_SYS_USE_PKG_CONFIG=1
+	# Gentoo bug #927338
+	if use !elibc_musl && use !elibc_Darwin && use !elibc_bionic; then
+		local -x CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1
+		local -x JEMALLOC_OVERRIDE="${ESYSROOT}/usr/$(get_libdir)"/libjemalloc.so
+	fi
+	cargo_src_test --target-dir "${PWD}"/tested-target/
+}
+
+src_install() {
+	local releasedir=$(cargo_target_dir)
+
+	dobin ${releasedir}/ruff
+
+	newbashcomp ruff-completion.bash ruff
+	newfishcomp ruff-completion.fish ruff.fish
+	newzshcomp ruff-completion.zsh _ruff
+
+	dodoc -r "${DOCS[@]}"
+}