From 7930dff884f7e7d9f6776467b8eb7127e8976970 Mon Sep 17 00:00:00 2001 From: Taylor Steinberg Date: Tue, 11 Jun 2024 13:36:54 -0400 Subject: [PATCH] build: use uv pip when available (#218) --- docs/Makefile | 7 ++++++- integration/Makefile | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index c00707e6..00d5f7c7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,7 +11,6 @@ CURRENT_YEAR ?= $(shell date +%Y) VERSION ?= $(shell make --silent -C ../ version | tail -n 1) ENV ?= dev - # Determine Netlify arguments from environment ifeq ($(ENV), prod) NETLIFY_ARGS := --prod @@ -19,6 +18,12 @@ else NETLIFY_ARGS := endif +# Determine if `uv` is available +ifneq ($(shell command -v uv 2>/dev/null),) +PIP := uv pip +else +PIP := pip3 +endif .PHONY: all \ api \ diff --git a/integration/Makefile b/integration/Makefile index 2bf5fcd4..9c0eaabb 100644 --- a/integration/Makefile +++ b/integration/Makefile @@ -39,6 +39,13 @@ CONNECT_IMAGE ?= rstudio/rstudio-connect DOCKER_COMPOSE ?= docker compose PYTHON ?= python3 +# Determine if `uv` is available +ifneq ($(shell command -v uv 2>/dev/null),) +PIP := uv pip +else +PIP := pip3 +endif + clean: rm -rf logs reports find . -type d -empty -delete