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=('fba0d3fddb7e2ff68bf78f482a270b709a24ba4fc92d8f97e496433f569639b7c93a2bc350e86081937a4fc618c07d4d2b29d460359f6c88f820d83611317fae')
25 b2sums=('529d47be60814a65f17764cc357e784f162bddd90a3bf4d82c3d9aa718acdfca565d4db64ac6eb2dba23766ba2b61efeed18dbb5b781f35d4bbd035c0688514c')
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"