Skip to content

Commit

Permalink
build: use uv build
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Sep 9, 2024
1 parent 1004582 commit e54e32f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include vars.mk
all: deps dev test lint build

build:
$(PYTHON) -m build
$(UV) build

clean:
$(MAKE) -C ./docs $@
Expand All @@ -30,16 +30,16 @@ cov-xml:
$(PYTHON) -m coverage xml

deps: ensure-uv
$(PIP) install --upgrade pip setuptools wheel -r requirements.txt -r requirements-dev.txt
$(UV) pip install --upgrade pip setuptools wheel -r requirements.txt -r requirements-dev.txt

dev: ensure-uv
$(PIP) install -e .
$(UV) pip install -e .

docs:
$(MAKE) -C ./docs

ensure-uv:
@if ! command -v uv >/dev/null 2>&1; then \
@if ! command -v $(UV) >/dev/null 2>&1; then \
if ! command -v pip >/dev/null 2>&1; then \
$(PYTHON) -m ensurepip; \
fi; \
Expand All @@ -51,7 +51,7 @@ fmt:
$(PYTHON) -m ruff format .

install: ensure-uv
$(PIP) install dist/*.whl
$(UV) pip install dist/*.whl

it:
$(MAKE) -C ./integration
Expand All @@ -64,7 +64,7 @@ test:
$(PYTHON) -m coverage run --source=src -m pytest tests

uninstall: ensure-uv
$(PIP) uninstall $(NAME)
$(UV) pip uninstall $(NAME)

version:
@$(PYTHON) -m setuptools_scm
Expand Down
3 changes: 2 additions & 1 deletion vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ endif
NETLIFY_SITE_ID ?= 5cea1f56-7935-4387-975a-18a7905d15ee

PYTHON := $(shell command -v python3 2>/dev/null || command -v python)
PIP = uv pip

SHELL := /bin/bash

QUARTO ?= quarto

QUARTODOC ?= quartodoc

UV := uv

0 comments on commit e54e32f

Please sign in to comment.