Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export PYPI_API_TOKEN=your_token_here

- Python 3.10+
- uv (install with: `./scripts/install.sh`)
- Version: 0.11.32 (pinned with cryptographic hashes in `requirements-uv.txt`)
- Version: 0.12.0 (pinned with cryptographic hashes in `requirements-uv.txt`)

### Environment Variables
For publishing scripts, you need to set these environment variables:
Expand Down
15 changes: 10 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

set -e

# Version of uv to install. This is the single source of truth for the
# development toolchain; keep it in sync with requirements-uv.txt (hashed
# pin) and the [tool.uv] required-version in pyproject.toml.
UV_VERSION="0.12.0"

echo "🚀 Installing uv for KeyChecker development..."

# Check if uv is already installed
Expand All @@ -28,13 +33,13 @@ case "$OS" in
echo "📦 Using Homebrew..."
brew install uv
else
echo "📦 Using curl installer..."
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "📦 Using versioned curl installer..."
curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh
fi
;;
"Linux")
echo "🐧 Installing uv on Linux..."
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh
;;
"MINGW"*|"MSYS"*|"CYGWIN"*)
echo "🪟 Installing uv on Windows..."
Expand All @@ -43,7 +48,7 @@ case "$OS" in
pip install --require-hashes -r requirements-uv.txt
else
echo "⚠️ requirements-uv.txt not found, using fallback installation..."
pip install uv==0.11.32
pip install "uv==${UV_VERSION}"
fi
;;
*)
Expand All @@ -60,7 +65,7 @@ if command -v uv &> /dev/null; then
echo "✅ uv installed successfully: $(uv --version)"
echo ""
echo "🎉 You can now set up the development environment:"
echo " ./scripts/setup-dev.sh"
echo " ./scripts/setup-dev.sh"
else
echo "❌ uv installation failed"
echo "Please install uv manually:"
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if ! command -v uv &> /dev/null; then
echo "📦 Installing uv..."
echo "Please install uv first:"
echo ""
echo " # Using curl (recommended)"
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
echo " # Using curl (recommended, versioned to match requirements-uv.txt)"
echo " curl -LsSf https://astral.sh/uv/0.12.0/install.sh | sh"
echo ""
echo " # Or using pip with pinned version"
echo " pip install --require-hashes -r requirements-uv.txt"
Expand Down
Loading