-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·37 lines (30 loc) · 797 Bytes
/
build.sh
File metadata and controls
executable file
·37 lines (30 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -e # Exit on any error
# Function to log steps
log() {
echo "==> $1"
}
if ! command -v uv &> /dev/null; then
log "uv not found. Please install uv first."
exit 1
fi
# Create and activate virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
log "Creating uv virtual environment"
uv venv
fi
log "Activating virtual environment"
if [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then
source .venv/Scripts/activate
else
source .venv/bin/activate
fi
# Install dependencies including dev dependencies
log "Installing dependencies"
uv pip install ".[dev]"
# Build and install the entire package
log "Building and installing package"
uvx maturin develop --release --uv
# Run tests
log "Running tests"
uv run pytest --benchmark-skip