commit: d3ea564e9feed4e483c1557d2ab3bdf556914560 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> AuthorDate: Fri Apr 25 21:22:19 2025 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Fri Apr 25 21:22:19 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3ea564e
dev-util/ruff: add 0.11.7 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> dev-util/ruff/Manifest | 2 + dev-util/ruff/ruff-0.11.7.ebuild | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) diff --git a/dev-util/ruff/Manifest b/dev-util/ruff/Manifest index b46c2bd5f17f..4ddc9fce9dd2 100644 --- a/dev-util/ruff/Manifest +++ b/dev-util/ruff/Manifest @@ -7,6 +7,8 @@ DIST ruff-0.11.2-crates.tar.xz 31005660 BLAKE2B a889c88f196f7fb306a171ef6970aa42 DIST ruff-0.11.2.gh.tar.gz 6112972 BLAKE2B 7c28b53b8877c95ad4a36ad9c7e672f5ab65b8774b1406f1582f337fdfd2255896929a4ed75911b0f1f9a730cc5f8ab39ec2756487944570787be133db47177a SHA512 42a15110d74f51d706459760dc57f1363629b689cd21427d7c65c1541cb1df2cd5467fec6941ef3cd9f8818fc6d0d57d3300abec4cbb39d4cfe37031fd5fecee DIST ruff-0.11.6-crates.tar.xz 31148052 BLAKE2B 72166185a639c5fafb2a88fef610cd5e6056f8461c2fa2a872b1e45687d03a060b41e2cd180e765be6ae48dac10484da1d8f0dae435c10e686eccfebb0e06c62 SHA512 4be9d175501d66c4f0be71cb63294b42f3e241ab324b5167bdf2f6a25a4b9e9583ae8ea371f268ad29f6b80d1656ba75df53e9f45c199f19dd389b95084cd57f DIST ruff-0.11.6.gh.tar.gz 6304747 BLAKE2B 433128df099513471e1ec17493eb7d8fd379acc142d884751c67c01d4b97fba8a269b8d607378d0de05e027ebb52749297f792c61618f682295d99e5594cc49f SHA512 ce7d4016d663d9a71cc68c2b39c5bdbdd3f73354f8a9f69c4734494c5e4a024bcf4d7f7b5f6eadf9ecd280ef59193cb85e5507f0e1560554db31d76146366927 +DIST ruff-0.11.7-crates.tar.xz 31153356 BLAKE2B b0c828ba0025ed2f6fb1bb4ae7371aaeec2d70bcff3622a5db7f14bb93df67ea696262442744ce42cabf1db99cf81ee09edc6f6bc26708ba5b3962b9a1ec376b SHA512 8d8de54085f239ce35576b1cddde22f8f82317ec880375b6335d12584bdc123be89b63fc5929663ae1da3bdc8d36d97e4c1281d1ae4cba103dcb36ad718fdee3 +DIST ruff-0.11.7.gh.tar.gz 6353627 BLAKE2B 98eddf4be944b971a45ed88d15c8c708a84919c95a4bf5b9cbbe118c807c49fec238f066c94933ff6127725a5d4304451c4c2642c997963343e7e881c2d190b5 SHA512 8174522594c7e8eecd197e707b97de914fa6a1cae6e25bf2b511942a50af0cf962f4c57b67d4f8ffd0487f842e30fbe5947d727d44e3105e7f5f140bf5066207 DIST ruff-0.9.10-crates.tar.xz 30394612 BLAKE2B beccd485fb1908f20bbea74f2ae8c467531ce78ade0dfb33d1e3690f131d46c3f8cbc9d3c7d50ec4513a7255669cb7f1f7f5ce9fc4f6e88cfb82371cb2818991 SHA512 4dd7151b9f8933488050371d0c9e20ceed53e6304b65bac5381cc29fa72704316ff9d82427dc033a1734683c7d83d40bdd6f6e28015b2b4699555f73a980f621 DIST ruff-0.9.10.gh.tar.gz 5987888 BLAKE2B 6c64a69ce72da79d599082c996b23a9faeb747e5fb4fb192cb2b1986924432f7fb49cf54dc5cb9f05ca31f94636fefdc64e23b80e29ff99bba9b761bcc91c24c SHA512 c281347e44b9f6a0773913c93d82d968b54461d7e62e7a813079e8a49069e5a4a831cd0c99514e957fb4d564315c9e5733d6ce9e9bf2b591b767cd673b92376d DIST ruff-0.9.9-crates.tar.xz 30401168 BLAKE2B 1dddf6329b47405f179c2942cca4337629364bc3baa754dffa2f90a0a85027be7fbd991f61db02ae451e74680d92f8b4bb333a9346e633f4790775bd453e99a1 SHA512 d1c936d6d63558d51df596ceafee6953f4b6cad966fed9b3829089223faa9da728ca4105ab3bf6a4cfd5b57da8916265b74da914675a75d8a98ff7940ac6a375 diff --git a/dev-util/ruff/ruff-0.11.7.ebuild b/dev-util/ruff/ruff-0.11.7.ebuild new file mode 100644 index 000000000000..9f3210751862 --- /dev/null +++ b/dev-util/ruff/ruff-0.11.7.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.14.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;87bf6b6c2d5f6479741271da73bd9d30c2580c26;salsa-%commit%/components/salsa-macro-rules' + [salsa-macros]='https://github.com/salsa-rs/salsa;87bf6b6c2d5f6479741271da73bd9d30c2580c26;salsa-%commit%/components/salsa-macros' + [salsa]='https://github.com/salsa-rs/salsa;87bf6b6c2d5f6479741271da73bd9d30c2580c26;salsa-%commit%' +) + +RUST_MIN_VER="1.84.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 +" +SRC_URI+=" 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} red_knot{,_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[@]}" +}
