Files
manjaro_kde_upload_tools/setup-venv.sh

20 lines
491 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"
export UV_CACHE_DIR="${UV_CACHE_DIR:-/tmp/uv-cache}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-${SCRIPT_DIR}/.cache}"
if ! command -v uv >/dev/null 2>&1; then
echo "未找到 uv请先安装 uv。" >&2
exit 1
fi
uv venv .venv
. .venv/bin/activate
uv pip install -r requirements.txt -r requirements-build.txt
echo "虚拟环境已就绪:${SCRIPT_DIR}/.venv"