commit: 5fe686f84671774a6ec58f2e7bee2d24cfa60445 Author: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> AuthorDate: Fri Aug 15 07:03:23 2025 +0000 Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> CommitDate: Fri Aug 15 07:05:13 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe686f8
dev-util/ruff: add 0.12.9 Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org> dev-util/ruff/Manifest | 3 + dev-util/ruff/ruff-0.12.9.ebuild | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index 4369f1c3e49d..bf095e5bda77 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -7,5 +7,8 @@ DIST ruff-0.12.7-crates.tar.xz 25207576 BLAKE2B 9492638ccec4a7db07e06fa96cebecde DIST ruff-0.12.7.gh.tar.gz 7760229 BLAKE2B 608f2559b9292a8e204e0cdcb19266a98044e45d76d2ad531f4a73f4ec2284216adc2895006577b4f42ee1fee965e91f1460b9cfc43f8623311207ef8b138369 SHA512 86ad98d27f3ccf39b2a66d01b4ac523806ead5e92c2701ca07cdfdf8c352c6d7216e6ace1480639385abf8bfc6d168f07a49a72e5c0b64d22dfe138974cc9e1f DIST ruff-0.12.8-crates.tar.xz 24601864 BLAKE2B 8bca9bd65b7bbfdd66ec8bef5aef9b5b8d4aab09a41bdde97cd05080ca44db53fa055583f1ce30f81a9c9782c278baca1f5cad628b7d299bc736f254e4d2bcbf SHA512 238a39abeab7afede8b2b8260b8166ac9dcd4026a44ed495bb793b238ad3e8b203c8bfeded52bcfe1aac957bcfdf31163b410d00122ca2188732de16e2873e98 DIST ruff-0.12.8.gh.tar.gz 7838556 BLAKE2B 74addbf33eb8658b68a87808c4df5807f197e4d94a7a593c6f1a4f1b81fc065d311c008fa682980dba4926d2235c4b66c92e9ecb9fcdf4decd7d3b58b556217d SHA512 050f215d529dc92a00e4df24ba2cceb0a07108275fb80be9b12e26b89951ab4c6a58661ce86184b839756164fda2bd037cddb6523df2f79ece9d010538975b78 +DIST ruff-0.12.9-crates.tar.xz 24609584 BLAKE2B b3621d98ef931739c041d5e0478640622fbcb53838b686d6bcf4af2c89efde184433dac9a2e433b17fe22ad6f640bb013a916c1b324770286512e64eb502ebdc SHA512 4f6a90c1c045bc9ea78c215fc9266cb1d2399e15897ff77fade543a827995f8630cc0f778b9f9546e79487c39359ef06f7ea8292170234906296f540edbfee4b +DIST ruff-0.12.9.gh.tar.gz 7848343 BLAKE2B b073386acb181551dee5a29a36a88c989cebb8efa7c744c044364126ee0248c714fbf188aa7b9b08dc4f6242916a6abe3b730521ab81b1f779c4f1d7d1a8b30a SHA512 1430e13625a391c017dd08d7b8b0b436011e1010fbac871393cbbc8d443277d96e257e464a2f6830d38562d7137baabcf65e170a7f7e2ec53936ed9a5b5de3c7 +DIST salsa-918d35d873b2b73a0237536144ef4d22e8d57f27.gh.tar.gz 710741 BLAKE2B 4a13e394d4d19b69b6ea95545efd861bafbfd7a8f1ac329e259a78b43cd1c2be8415b20b789d5ed7a1472fb1b394b1b2be6149482615aa04f6344963d66cf972 SHA512 fd076cf031cfd9be1c8cc8a691341efc12f95de3a3b3ef9f95a5f53e5363b90c34572170202368e39eea6003278a052d48287b82fd19b5a217ffeecd708fa3a2 DIST salsa-dba66f1a37acca014c2402f231ed5b361bd7d8fe.gh.tar.gz 685209 BLAKE2B 6aaea2c8d800e2950fbbfeb2cc30dce5c0aa098e98f88e7cf896af1888c35b2cf1ac6e25d3f7cc6f493effdc7ab007c7e827ba1ffb85cb1ef3575b7815b7178f SHA512 7b77e59d33db8e47b6c72fe7bb94e3cc6ff9e00ab92f786924046a7b7d62386b6806eb5dd3f1f5b34d7326aef661518734fb4e691f18b8ed5aaa738ef9a493c2 DIST salsa-fc00eba89e5dcaa5edba51c41aa5f309b5cb126b.gh.tar.gz 684112 BLAKE2B 624720fd4887982ef6da5b69dcc81a7290f791267d6915e636a8ade13663d670f34ee2a4492e13c7ea8a6f611a61b08ec31c34c9a4accf57a11d135fc17ae2ea SHA512 6f2f3b3d5fb20d863d0c661a1d4f2076591ab97b3c435f3eb4f22d9065a36800fbe617eaf6086682ab3eba38580ef08adb512bd72b40129b3b698ea00430675d diff --git a/dev-util/ruff/ruff-0.12.9.ebuild b/dev-util/ruff/ruff-0.12.9.ebuild new file mode 100644 index 000000000000..4722f6e34890 --- /dev/null +++ b/dev-util/ruff/ruff-0.12.9.ebuild @@ -0,0 +1,117 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Autogenerated by pycargoebuild 0.15.0 + +EAPI=8 + +CRATES=" +" + +declare -A GIT_CRATES=( + [lsp-types]='https://github.com/astral-sh/lsp-types;3512a9f33eadc5402cfab1b8f7340824c8ca1439;lsp-types-%commit%' + [salsa-macro-rules]='https://github.com/salsa-rs/salsa;918d35d873b2b73a0237536144ef4d22e8d57f27;salsa-%commit%/components/salsa-macro-rules' + [salsa-macros]='https://github.com/salsa-rs/salsa;918d35d873b2b73a0237536144ef4d22e8d57f27;salsa-%commit%/components/salsa-macros' + [salsa]='https://github.com/salsa-rs/salsa;918d35d873b2b73a0237536144ef4d22e8d57f27;salsa-%commit%' +) + +RUST_MIN_VER="1.86.0" + +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 + CODE_OF_CONDUCT.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{,_{ide,project,server}} *_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 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 + newzshcomp ruff-completion.zsh _ruff + + dodoc -r "${DOCS[@]}" +}
