Daniel M. Capella pushed to branch main at Arch Linux / Packaging / Packages / 
ruff


Commits:
7df30008 by Daniel M. Capella at 2025-08-28T14:07:19-04:00
upgpkg: 0.12.11-1: Also move completion generation to build()

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,6 +1,6 @@
 pkgbase = ruff
        pkgdesc = An extremely fast Python linter, written in Rust
-       pkgver = 0.12.10
+       pkgver = 0.12.11
        pkgrel = 1
        url = https://github.com/astral-sh/ruff
        arch = x86_64
@@ -12,9 +12,9 @@ pkgbase = ruff
        depends = gcc-libs
        depends = glibc
        options = !lto
-       source = git+https://github.com/astral-sh/ruff.git#tag=0.12.10
-       sha512sums = 
4a5f88b6975daba8e03c2b25f11641187ae9c464b7709f847719687984c5949f32be434951b3a9f3f6109cadaa178cb869cf98f664a75759298a2bb9757c9aa6
-       b2sums = 
b60c808d18a046361464db306dc998e951df687603157d37bc7d4c56fd0162d9648267ec1459fdf73ed0a9143eb741f75bf789ed8969dce72a2bb0a4dd7a5aab
+       source = git+https://github.com/astral-sh/ruff.git#tag=0.12.11
+       sha512sums = 
b70293e00b6669f2f111afb89a189c1e105b3dcc762381ee6c9e2ec8521a0c7490b111304e042fe329a2cb73fc02b56f8516550127bca84a36daeec27ed5d39a
+       b2sums = 
853a2f40dc6dc3b302a0f0dbc6269e88394793b58b536b0116c4749a740d1d76b13c5cf5b431b13d1de137cc607fc0a7b08fcdf4016859dbda6e9489d4091e81
 
 pkgname = ruff
 


=====================================
PKGBUILD
=====================================
@@ -5,7 +5,7 @@
 
 pkgbase=ruff
 pkgname=("$pkgbase" "python-$pkgbase")
-pkgver=0.12.10
+pkgver=0.12.11
 pkgrel=1
 pkgdesc='An extremely fast Python linter, written in Rust'
 arch=(x86_64)
@@ -23,8 +23,8 @@ makedepends=(
 )
 options=(!lto)
 source=("git+$url.git#tag=$pkgver")
-sha512sums=('4a5f88b6975daba8e03c2b25f11641187ae9c464b7709f847719687984c5949f32be434951b3a9f3f6109cadaa178cb869cf98f664a75759298a2bb9757c9aa6')
-b2sums=('b60c808d18a046361464db306dc998e951df687603157d37bc7d4c56fd0162d9648267ec1459fdf73ed0a9143eb741f75bf789ed8969dce72a2bb0a4dd7a5aab')
+sha512sums=('b70293e00b6669f2f111afb89a189c1e105b3dcc762381ee6c9e2ec8521a0c7490b111304e042fe329a2cb73fc02b56f8516550127bca84a36daeec27ed5d39a')
+b2sums=('853a2f40dc6dc3b302a0f0dbc6269e88394793b58b536b0116c4749a740d1d76b13c5cf5b431b13d1de137cc607fc0a7b08fcdf4016859dbda6e9489d4091e81')
 
 prepare() {
   cd $pkgbase
@@ -32,8 +32,15 @@ prepare() {
 }
 
 build() {
+  local target=$(rustc -vV | sed -n 's/host: //p')
+  local target_binary=target/$target/release/$pkgbase
+
   cd $pkgbase
-  maturin build --locked --release --all-features --target "$(rustc -vV | sed 
-n 's/host: //p')" --strip
+  maturin build --locked --release --all-features --target "$target" --strip
+
+  for completion in bash elvish fish nushell zsh; do
+    $target_binary generate-shell-completion $completion > 
$completion-completions
+  done
 }
 
 check() {
@@ -49,13 +56,12 @@ _package_common() {
 package_ruff() {
   cd $pkgbase
   _package_common
-  local _target="target/$(rustc -vV | sed -n 's/host: //p')/release/ruff"
-  install -Dm0755 -t "$pkgdir/usr/bin/" "$_target"
-  $_target generate-shell-completion bash    | install -Dm0644 /dev/stdin 
"$pkgdir/usr/share/bash-completion/completions/$pkgbase.bash"
-  $_target generate-shell-completion elvish  | install -Dm0644 /dev/stdin 
"$pkgdir/usr/share/elvish/lib/$pkgbase.elv"
-  $_target generate-shell-completion fish    | install -Dm0644 /dev/stdin 
"$pkgdir/usr/share/fish/vendor_completions.d/$pkgbase.fish"
-  $_target generate-shell-completion nushell | install -Dm0644 /dev/stdin 
"$pkgdir/usr/share/nushell/vendor/autoload/$pkgbase.nu"
-  $_target generate-shell-completion zsh     | install -Dm0644 /dev/stdin 
"$pkgdir/usr/share/zsh/site-functions/_$pkgbase"
+  install -Dm0755 -t "$pkgdir/usr/bin/" "target/$(rustc -vV | sed -n 's/host: 
//p')/release/ruff"
+  install -Dm0644 bash-completions 
"$pkgdir/usr/share/bash-completion/completions/$pkgbase.bash"
+  install -Dm0644 elvish-completions 
"$pkgdir/usr/share/elvish/lib/$pkgbase.elv"
+  install -Dm0644 fish-completions 
"$pkgdir/usr/share/fish/vendor_completions.d/$pkgbase.fish"
+  install -Dm0644 nushell-completions 
"$pkgdir/usr/share/nushell/vendor/autoload/$pkgbase.nu"
+  install -Dm0644 zsh-completions 
"$pkgdir/usr/share/zsh/site-functions/_$pkgbase"
 }
 
 package_python-ruff() {
@@ -66,5 +72,5 @@ package_python-ruff() {
   python -m installer -d "$pkgdir" target/wheels/*.whl
 
   cd "$pkgdir"
-  rm -rf usr/bin
+  rm -r usr/bin
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/ruff/-/commit/7df300081e9d7a84865d232110af03fada74ce54

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/ruff/-/commit/7df300081e9d7a84865d232110af03fada74ce54
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to