commit: 2e6281988c37e6dc88e04c58b9607db12f4d07ff Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> AuthorDate: Thu Sep 4 22:12:52 2025 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Thu Sep 4 22:12:52 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e628198
dev-util/ruff: add 0.12.12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> dev-util/ruff/Manifest | 2 + dev-util/ruff/ruff-0.12.12.ebuild | 117 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index 18862f0e430b..65adc7261622 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -3,6 +3,8 @@ DIST ruff-0.12.10-crates.tar.xz 24617920 BLAKE2B 11247ebfdb74b49c5ba694bd0fa31d4 DIST ruff-0.12.10.gh.tar.gz 7915877 BLAKE2B 33e7a3a7ed6b0796036d39beb013492dc20f00f51e7ce9513ec700f78dbfc368c914187737943a20024e2dd6e36376b2ac989c7709b548c274d44fea4d058726 SHA512 9a46b226af223d9872cd8c0698547879aca1e21dec553e57c8502b67c1b3dbcdf2f1b9dc0682f3aa0afe4212cd0079667d520bc065eecbc7700506905c08a5f2 DIST ruff-0.12.11-crates.tar.xz 24563140 BLAKE2B 844e57b5101100a3d3487cd5f7bc58395c6e60bfeaf7996b37690e0744cafb36ef5feafbfe5cc6303906dc673c7b5fa1e0ee1c05df62ec0c4ac1bff2127cb537 SHA512 7bf088fce34bf2c9ede46ee79a50984b5f76ee906e3399a73b02af3ecc7d527ac88332f2a3f9f005dedfd2b7e0aa6815121a6bed6e7f7d264aef01bd92265843 DIST ruff-0.12.11.gh.tar.gz 7963716 BLAKE2B a2a0715247030aa1e8bf34b2d1ff1f6fde1f0384e4e06d3857ac5accab34c56f23e77b1f31018db9b2578a8ef270667f6ee93082645ed23613da74d428067270 SHA512 4ed5e170281a3904849f2e4341be0b5e14309728bb35ce5799aabca7e9a763b81d96935a407bbad0c12d691fede99a355a84dfa224e3f23b43d6dd0896552526 +DIST ruff-0.12.12-crates.tar.xz 22154512 BLAKE2B 66737f8b22d10a71cbd62c5817c4c444b762f72b78ae6e1fb1512387ee62832e75726438526981304382659920bcbcdc1779de2592a5e9a7b1b58129c43809eb SHA512 a789175ed6dbe408a0aa7aaabcb3f0d1401aa7d4050c270325d133c941bcfbe6e61e58887e2833199c2207a376625d740a1f572ac122f5c9c3d778605be90bf3 +DIST ruff-0.12.12.gh.tar.gz 7927550 BLAKE2B 91717175fa6712380b703e816c42836d152268d1a2f6d3a4014898c3a38c1d74156d3d24a26426ef502bdf7f8fe734dc81652b964d864d583b84110686cb2f43 SHA512 f559610c424c11c202ea3aa1b9e4726273927d11ecd26d4055253fa2a85f3ccbfe1d8e654d09fac526ab8c7ff9531a74f10fb975dc68036b76dc4ab969c9f7c8 DIST ruff-0.12.4-crates.tar.xz 25059288 BLAKE2B 8ca959d5db508199a4ca65b6ba5c7610eb4d78d74fc0d3a1b7f5d6a27a26d072b9b84506db02514b2cc176c5263950b6ed2fa11fc4d5c0b1bc03cf308a61e0cd SHA512 34ca78c9d40a92a88638e3bb74ab909044a9806ec7524ab3144bc057f2621ed39e53bbf51ea3994d2f386216f280175393a5cf5f5469bf591fa295b7b4e12cc4 DIST ruff-0.12.4.gh.tar.gz 7642686 BLAKE2B d4c6b8481fa387371d906be2f08870af61dc21cc773e4bb5578fba92bc19e0e8ebbe745833da20bad23af2413c46bbd73cf583e7b0a4b9b0f938f09b21536840 SHA512 8a41d1d9632f8e90822032881dca066797b781a3f82c898d74859235b6f31a9ad97e342c95d8af8dd7e498a75a769aecbd2dfea706beb836f5d35d657b6e1920 DIST ruff-0.12.7-crates.tar.xz 25207576 BLAKE2B 9492638ccec4a7db07e06fa96cebecded216e673024b3e120a9ba1392bef30ce9775d797576f9906a66d014d4b91f79159377b572d1863618d847018639a4231 SHA512 811324ae290fda4c3b707845353f93cb58918201233ed5e067b8bd19bdfa69ceb9bc09032527e707da4dea8a0938890eca68fb608feca17ae43f34bcfe8d66cd diff --git a/dev-util/ruff/ruff-0.12.12.ebuild b/dev-util/ruff/ruff-0.12.12.ebuild new file mode 100644 index 000000000000..75f7043a748d --- /dev/null +++ b/dev-util/ruff/ruff-0.12.12.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;a3ffa22cb26756473d56f867aedec3fd907c4dd9;salsa-%commit%/components/salsa-macro-rules' + [salsa-macros]='https://github.com/salsa-rs/salsa;a3ffa22cb26756473d56f867aedec3fd907c4dd9;salsa-%commit%/components/salsa-macros' + [salsa]='https://github.com/salsa-rs/salsa;a3ffa22cb26756473d56f867aedec3fd907c4dd9;salsa-%commit%' +) + +RUST_MIN_VER="1.87.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[@]}" +}
