From b085400d6ff5d4282d4caaebad1432e5c469e7ac Mon Sep 17 00:00:00 2001 From: Breno Brito Date: Sat, 22 Nov 2025 16:10:19 -0300 Subject: [PATCH] chore: Prefer uv over pip for dependencies --- scripts/generate-linux.sh | 10 +++++++++- scripts/generate-macos-arm64.sh | 10 +++++++++- scripts/generate-macos-x86_64.sh | 10 +++++++++- scripts/generate-windows.sh | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/scripts/generate-linux.sh b/scripts/generate-linux.sh index b70819b..d092094 100644 --- a/scripts/generate-linux.sh +++ b/scripts/generate-linux.sh @@ -8,7 +8,15 @@ printf "Submodule is checked out at commit: $(git submodule status)\n\n" echo "Setting up Python dependencies..." ${PYBIN}/python --version -${PYBIN}/pip install -r requirements.txt + +# 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 +else + echo "Using pip to install dependencies..." + ${PYBIN}/pip install -r requirements.txt || ${PYBIN}/pip3 install -r requirements.txt +fi cd ./bdk-ffi/bdk-ffi/ diff --git a/scripts/generate-macos-arm64.sh b/scripts/generate-macos-arm64.sh index 210a736..06e6df7 100644 --- a/scripts/generate-macos-arm64.sh +++ b/scripts/generate-macos-arm64.sh @@ -8,7 +8,15 @@ printf "Submodule is checked out at commit: $(git submodule status)\n\n" echo "Setting up Python dependencies..." python3 --version -pip install -r requirements.txt + +# 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 +else + echo "Using pip to install dependencies..." + pip install -r requirements.txt || pip3 install -r requirements.txt +fi cd ./bdk-ffi/bdk-ffi/ diff --git a/scripts/generate-macos-x86_64.sh b/scripts/generate-macos-x86_64.sh index 83d9c21..4ed83a2 100644 --- a/scripts/generate-macos-x86_64.sh +++ b/scripts/generate-macos-x86_64.sh @@ -8,7 +8,15 @@ printf "Submodule is checked out at commit: $(git submodule status)\n\n" echo "Setting up Python dependencies..." python3 --version -pip install -r requirements.txt + +# 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 +else + echo "Using pip to install dependencies..." + pip install -r requirements.txt || pip3 install -r requirements.txt +fi cd ./bdk-ffi/bdk-ffi/ diff --git a/scripts/generate-windows.sh b/scripts/generate-windows.sh index 58d89b6..aaefb69 100644 --- a/scripts/generate-windows.sh +++ b/scripts/generate-windows.sh @@ -8,7 +8,15 @@ printf "Submodule is checked out at commit: $(git submodule status)\n\n" echo "Setting up Python dependencies..." python3 --version -pip install -r requirements.txt + +# 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 +else + echo "Using pip to install dependencies..." + pip install -r requirements.txt || pip3 install -r requirements.txt +fi cd ./bdk-ffi/bdk-ffi/