Skip to content

Update scripts to use uv #26

@brenorb

Description

@brenorb

uv is the modern way to mange Python packages and environments. uv is very fast, written on rust and uses the most updated and best practices of Python, but also interoperable with old APIs, making its management simple.

I suggest changing the scripts from this:

pip install -r requirements.txt

to this (which would work both ways):

# Check for uv first (faster), then fall back to pip
if command -v uv &> /dev/null; then
    echo "Using uv to install dependencies..."
    uv add -r requirements.txt
elif command -v pip &> /dev/null || command -v pip3 &> /dev/null; then
    echo "Using pip to install dependencies..."
    pip install -r requirements.txt
else
    echo "Error: Neither uv nor pip found. Please install one of them."
    exit 1
fi

I, for example, don't have pip globally installed and only use uv, so I changed the script run it for me.
If you find this is ok, I can drop a PR.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions