# Template file for 'ruff'
pkgname=ruff
version=0.5.7
revision=1
build_style=python3-pep517
build_helper="rust qemu"
hostmakedepends="maturin cargo"
makedepends="rust-std"
short_desc="Fast Python linter and code formatter"
maintainer="icp <pangolin@vivaldi.net>"
license="MIT"
homepage="https://docs.astral.sh/ruff/"
changelog="https://raw.githubusercontent.com/astral-sh/ruff/main/CHANGELOG.md"
distfiles="https://github.com/astral-sh/ruff/archive/refs/tags/${version}.tar.gz"
checksum=7ac2fd49222dc31aac0f97a40ea5d1d74dee9a1228ff5d62d603359713d8e0d1

post_install() {
	vlicense LICENSE
	for shell in bash fish zsh; do
		vtargetrun "$DESTDIR"/usr/bin/ruff generate-shell-completion $shell > ruff.$shell
		vcompletion ruff.$shell $shell
	done
}
