diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index ac849e8ab7571..a85f54f16a9d3 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -18,6 +18,8 @@ DIST ruff-0.15.7-crates.tar.xz 27536700 BLAKE2B df3367d06df5d698b720b39fdc67f2fb DIST ruff-0.15.7.gh.tar.gz 11275556 BLAKE2B 86bd8ba4ab15488d8eff99aed59a9f971a5afb9e66dd7f1c2d41897cfd5e15f94861dae6fbcba35267900f02c6670918c4d6a2e0e1d1e523595f0883204ab370 SHA512 4f72fd3e16781ff2029b7da813209ca86024c2b38545d1540890b9b1cfcba13bfd729f02202c1efd9414e27ebb5533ed5c641dd0ff6663467f6f7dd44a3a3023 DIST ruff-0.15.8-crates.tar.xz 27533848 BLAKE2B 1f76cc4b0a8e8fd10ea8d8fc1919d6ceaf8bef3e6531b68f836800e9016ac2022d08a211bbe9ab43ef33c17df5fd62ee6cd845f93dece6dd88df3e567d13a84a SHA512 58399d4a87916cf8d6221bc26c43e594c9f78620b8e9ec38b9d467b0c1a5482e72678235e0e8dab4f335c1b90d4cf4504f0f92d647202d0bfc288dbedeaa16bf DIST ruff-0.15.8.gh.tar.gz 11339555 BLAKE2B 8bf1da708278459807ab120e17d762c128f7a10f5a6103881ca650b278eb938815f9ee9b2c22e755e1c38fd525269932138f5849dafdbdda930ec45e76273790 SHA512 868d8946a1f6d89f042a97a7cf21b99b4e56238a0020913e4a23a1cd3b617615ba556462a1dd7a6cf5cdae289d3fcc5291eedf0e7381a01b425f69d381dc799a +DIST ruff-0.15.9-crates.tar.xz 27352792 BLAKE2B 140953d256d46bcd0928c3502e36da87cfa35ab7a14a82fd81bf520250b75cc9837ee71e8b744c720c1202e8a26dca173f79baecfe87d212dd251f2d06f0c99a SHA512 dd666997648769a48d5d8020e69af1b7fa13378149f68eb2d260c252ce7a057ff6795a5642790a70fcea3430a6ee2ef3abc1f2f8bee78c7d9492e9f1471f1ebb +DIST ruff-0.15.9.gh.tar.gz 11389702 BLAKE2B 81d4e7577559a2d82e1c4293706a5229c8b3b0ee3fdd701ab372be3cac6a37c0edcb0743bbefc443310024730d41e87e3059df1c0a4aaeef3e6ea1b86ecea834 SHA512 aadb010020b5fe4c5f9b550af094f62a9c583efe96fadd0c8fa952167cd4ebeec42440d89759d911019581bb5637d11b7fa37996251c4e64d845ecd04b3dd7ae DIST salsa-2f687a17ceea8ec7aaa605561ccbde938ccef086.gh.tar.gz 743865 BLAKE2B 8c0cf9e079e896e811708bf08ac0cb3817de21e0632c79e6a684bb10c87b13c760b72b13b2ec87457b2c7b1c36ff7870621f7b21933644f5e5fdbeca2505cab2 SHA512 8299b53c94ffa67dcd8fb903247469375c04efa6e581d4696576b02f5b325ca84f14b12c0b9f93a4792900983356613de489dbdab886b0396b74967b26bd114d DIST salsa-3713cd7eb30821c0c086591832dd6f59f2af7fe7.gh.tar.gz 717350 BLAKE2B 3db412c1ce2953fdde9f182e9611d8dfe09b197be36c69ebf77344fbdf1efb542b94ca61c5cbcc39fdb3df8ec1e374d19e1e1116174f63f907e28b51f14f19cf SHA512 49bcdede05f7f681d075739b685e1807e978d8160374b2d6176246b90255d72c202205e7591af76ce362706793ca8c15f1a3854849c63b466313eaf363ad8c61 DIST salsa-53421c2fff87426fa0bb51cab06632b87646de13.gh.tar.gz 742301 BLAKE2B 90a53f87b823c360fce95c32fa573650892e40d4f7b260b52efa9bd96da903342ba5cd8adfffed34f168e546a9a1c140ecf22c80731d458cd8e06c84bd6c4d24 SHA512 4471203f3a2a6db0766ce2d426583f9c55277987200bf863c31b1ef09f9ede77091d47ad3a971ae2653d34a02cb2f79b5fb0e6da7a0860dca6636ebba1651ae6 diff --git a/dev-util/ruff/ruff-0.15.9.ebuild b/dev-util/ruff/ruff-0.15.9.ebuild new file mode 100644 index 0000000000000..2602ab360b375 --- /dev/null +++ b/dev-util/ruff/ruff-0.15.9.ebuild @@ -0,0 +1,118 @@ +# 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=" +" + +declare -A GIT_CRATES=( + [lsp-types]='https://github.com/astral-sh/lsp-types;e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c;lsp-types-%commit%' + [salsa-macro-rules]='https://github.com/salsa-rs/salsa;2f687a17ceea8ec7aaa605561ccbde938ccef086;salsa-%commit%/components/salsa-macro-rules' + [salsa-macros]='https://github.com/salsa-rs/salsa;2f687a17ceea8ec7aaa605561ccbde938ccef086;salsa-%commit%/components/salsa-macros' + [salsa]='https://github.com/salsa-rs/salsa;2f687a17ceea8ec7aaa605561ccbde938ccef086;salsa-%commit%' +) + +RUST_MIN_VER="1.92" + +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[@]}" +}