1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
5 pkgname=($pkgbase python-$pkgbase)
8 pkgdesc='An extremely fast Python linter, written in Rust'
10 url="https://github.com/charliermarsh/$pkgname"
22 _archive="$pkgname-$pkgver"
23 source=($url/archive/refs/tags/v$pkgver/$_archive.tar.gz)
24 sha512sums=('7faba5e64a1a032a757e7f8c7d2d893622a57ac78fbac048405d2c5102e43ffb91a73f5de0ffa17d89d5ef0b0d6f1563ed4693a8240b8758064ebf8ca77b00b9')
25 b2sums=('8fe63692dc6915593578cf970da409b389523a62ffb4a4c35a1ca9ea6207fcb407864a3eda48027d55465b1be08bd90b60f8afcf73c5ce44ccdb4e059606373a')
29 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
34 maturin build --locked --release --all-features --target "$CARCH-unknown-linux-gnu" --strip
39 cargo test -p ruff_cli --frozen --all-features
43 install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
44 install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
50 local _target="target/$CARCH-unknown-linux-gnu/release/ruff"
51 install -Dm0755 -t "$pkgdir/usr/bin/" "$_target"
52 $_target --generate-shell-completion bash | install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$pkgname.bash"
53 $_target --generate-shell-completion fish | install -Dm0644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
54 $_target --generate-shell-completion zsh | install -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
57 package_python-ruff() {
60 depends=(python "$pkgbase")
61 python -m installer -d "$pkgdir" target/wheels/*.whl
62 rm -rf "$pkgdir/usr/bin"