Skip to content

Commit 2a74dbb

Browse files
committed
chore: Updated Makefile
1 parent 1fc9a07 commit 2a74dbb

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

Makefile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PYMODULE := project_name
44
TESTS := tests
55
INSTALL_STAMP := .install.stamp
6-
POETRY := $(shell command -v poetry 2> /dev/null)
6+
UV := $(shell command -v uv 2> /dev/null)
77
MYPY := $(shell command -v mypy 2> /dev/null)
88

99
.DEFAULT_GOAL := help
@@ -24,31 +24,25 @@ help:
2424
@echo "Check the Makefile to know exactly what each target is doing."
2525
@echo "Most actions are configured in 'pyproject.toml'."
2626

27-
install: $(INSTALL_STAMP)
28-
$(INSTALL_STAMP): pyproject.toml
29-
@if [ -z $(POETRY) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi
30-
$(POETRY) run pip install --upgrade pip setuptools
31-
$(POETRY) install --with dev,tests,linters
32-
touch $(INSTALL_STAMP)
27+
install:
28+
@if [ -z $(UV) ]; then echo "uv could not be found. See https://docs.astral.sh/uv/"; exit 2; fi
29+
$(UV) sync --frozen
3330

3431
.PHONY: lint
3532
lint: $(INSTALL_STAMP)
3633
# Configured in pyproject.toml
37-
# Skips mypy if not installed
38-
#
39-
# $(POETRY) run black --check $(TESTS) $(PYMODULE) --diff
40-
@if [ -z $(MYPY) ]; then echo "Mypy not found, skipping..."; else echo "Running Mypy..."; $(POETRY) run mypy $(PYMODULE) $(TESTS); fi
41-
@echo "Running Ruff..."; $(POETRY) run ruff . --fix
34+
@echo "Running Ruff..."; $(UV) run ruff check --fix .
35+
@echo "Running Mypy..."; $(UV) run mypy $(PYMODULE) $(TESTS)
4236
@echo "Running Cargo lint..."; cargo lint
4337

4438
.PHONY: test
4539
test: $(INSTALL_STAMP)
4640
# Configured in pyproject.toml
47-
$(POETRY) run pytest
41+
$(UV) run pytest
4842

4943
.PHONY: build
5044
build: $(INSTALL_STAMP)
51-
$(POETRY) run maturin develop
45+
$(UV) run maturin develop
5246

5347
.PHONY: clean
5448
clean:

0 commit comments

Comments
 (0)