11# Makefile for l9format-python project
22
3- VERSION := $(shell poetry version -s )
3+ VERSION := $(shell python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb') )['project']['version'])" )
44
55UNAME_S := $(shell uname -s)
66ifeq ($(UNAME_S ) ,Darwin)
@@ -24,43 +24,43 @@ all: format sort lint typecheck test security-check ## Run all quality checks
2424
2525.PHONY : test
2626test : # # Run tests using pytest
27- poetry run pytest
27+ uv run pytest
2828
2929.PHONY : format
3030format : # # Format code using black
31- poetry run black .
31+ uv run black .
3232
3333.PHONY : check-format
3434check-format : # # Check code formatting with black
35- poetry run black --check .
35+ uv run black --check .
3636
3737.PHONY : sort
3838sort : # # Sort imports using isort
39- poetry run isort .
39+ uv run isort .
4040
4141.PHONY : check-sort
4242check-sort : # # Check import sorting with isort
43- poetry run isort --check-only .
43+ uv run isort --check-only .
4444
4545.PHONY : lint
4646lint : # # Lint code using ruff
47- poetry run ruff check .
47+ uv run ruff check .
4848
4949.PHONY : lint-fix
5050lint-fix : # # Lint and fix code using ruff
51- poetry run ruff check --fix .
51+ uv run ruff check --fix .
5252
5353.PHONY : lint-shell
5454lint-shell : # # Lint shell scripts using shellcheck
5555 shellcheck .github/scripts/* .sh
5656
5757.PHONY : typecheck
5858typecheck : # # Run mypy type checker
59- poetry run mypy l9format
59+ uv run mypy l9format
6060
6161.PHONY : security-check
6262security-check : # # Check for vulnerable dependencies using pip-audit
63- poetry run pip-audit
63+ uv run pip-audit
6464
6565.PHONY : fix-trailing-whitespace
6666fix-trailing-whitespace : # # Remove trailing whitespaces from all files
@@ -97,12 +97,12 @@ check-trailing-whitespace: ## Check for trailing whitespaces in source files
9797 fi
9898
9999.PHONY : install
100- install : # # Install dependencies with Poetry
101- poetry install
100+ install : # # Install dependencies with uv
101+ uv sync
102102
103103.PHONY : build
104104build : clean-dist # # Build package for distribution
105- poetry build
105+ uv build
106106
107107.PHONY : publish-dry-run
108108publish-dry-run : build # # Dry-run: show what would be published
@@ -111,11 +111,11 @@ publish-dry-run: build ## Dry-run: show what would be published
111111 @echo " Would create GitHub release: v$( VERSION) "
112112 @echo " Package contents:"
113113 @ls -lh dist/
114- poetry publish --dry-run
114+ uv publish --dry-run
115115
116116.PHONY : publish
117117publish : build # # Publish to PyPI, tag and create GitHub release
118- poetry publish
118+ uv publish
119119 git tag -a " v$( VERSION) " -m " Release v$( VERSION) "
120120 git push origin " v$( VERSION) "
121121 gh release create " v$( VERSION) " dist/* \
0 commit comments