mirror of
https://github.com/archlinux/aur.git
synced 2026-03-06 23:12:53 +01:00
Fix launcher script to use venv python directly
- Replace activate script sourcing with direct venv python usage - This avoids hardcoded build paths in activate script - Bump pkgrel to 7
This commit is contained in:
parent
b8672ebb03
commit
a4c5cdc4f6
2 changed files with 27 additions and 2 deletions
2
.SRCINFO
2
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = hyprwhspr
|
||||
pkgdesc = Native Whisper speech-to-text for Arch/Omarchy with Waybar integration
|
||||
pkgver = 1.2.0
|
||||
pkgrel = 6
|
||||
pkgrel = 7
|
||||
url = https://github.com/goodroot/hyprwhspr
|
||||
install = hyprwhspr.install
|
||||
arch = x86_64
|
||||
|
|
|
|||
27
PKGBUILD
27
PKGBUILD
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
pkgname=hyprwhspr
|
||||
pkgver=1.2.0
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Native Whisper speech-to-text for Arch/Omarchy with Waybar integration"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/goodroot/hyprwhspr"
|
||||
|
|
@ -52,6 +52,31 @@ package() {
|
|||
chmod +x "${pkgdir}/opt/${pkgname}/scripts/"*.sh
|
||||
chmod +x "${pkgdir}/opt/${pkgname}/bin/hyprwhspr"
|
||||
|
||||
# Fix the launcher script to use venv python directly
|
||||
cat > "${pkgdir}/opt/${pkgname}/bin/hyprwhspr" << 'EOF'
|
||||
#!/bin/bash
|
||||
|
||||
# HyprWhspr - Hyprland-optimized voice dictation application
|
||||
# Main launcher script
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PACKAGE_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
# Set environment variables
|
||||
export HYPRWHSPR_ROOT="$PACKAGE_ROOT"
|
||||
export PYTHONPATH="$PACKAGE_ROOT/lib:$PYTHONPATH"
|
||||
|
||||
# Use virtual environment's python directly if it exists
|
||||
if [ -f "$PACKAGE_ROOT/venv/bin/python" ]; then
|
||||
exec "$PACKAGE_ROOT/venv/bin/python" "$PACKAGE_ROOT/lib/main.py" "$@"
|
||||
else
|
||||
# Fallback to system python
|
||||
exec python3 "$PACKAGE_ROOT/lib/main.py" "$@"
|
||||
fi
|
||||
EOF
|
||||
chmod +x "${pkgdir}/opt/${pkgname}/bin/hyprwhspr"
|
||||
|
||||
# Create Python virtual environment and install pip-only dependencies
|
||||
cd "${pkgdir}/opt/${pkgname}"
|
||||
python -m venv venv
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue