@@ -23,10 +23,15 @@ COVERAGE ?= 0 # Set COVERAGE=1 to enable coverage: make test COVERAGE=1
2323COVERAGE_FAIL_UNDER ?= 85 # Minimum coverage % to pass: make coverage-report COVERAGE_FAIL_UNDER=70
2424KEEP_COMPOSE ?= 0 # Set KEEP_COMPOSE=1 to keep containers after integration tests
2525
26+ PIP = python -m pip
27+
28+ POETRY_VERSION = 2.1.4
29+ POETRY = python -m poetry
30+
2631ifeq ($(COVERAGE ) ,1)
27- TEST_RUNNER = poetry run coverage run --parallel-mode --source=pyiceberg -m
32+ TEST_RUNNER = $( POETRY ) run coverage run --parallel-mode --source=pyiceberg -m
2833else
29- TEST_RUNNER = poetry run
34+ TEST_RUNNER = $( POETRY ) run
3035endif
3136
3237ifeq ($(KEEP_COMPOSE ) ,1)
3540 CLEANUP_COMMAND = docker compose -f dev/docker-compose-integration.yml down -v --remove-orphans 2>/dev/null || true
3641endif
3742
38- POETRY_VERSION = 2.1.4
39-
4043# ============
4144# Help Section
4245# ============
@@ -53,21 +56,21 @@ help: ## Display this help message
5356# #@ Setup
5457
5558install-poetry : # # Ensure Poetry is installed at the specified version
56- @if ! command -v poetry & > /dev/null; then \
59+ @if ! command -v ${POETRY} & > /dev/null; then \
5760 echo " Poetry not found. Installing..." ; \
58- pip install --user poetry==$(POETRY_VERSION ) ; \
61+ ${PIP} install --user poetry==$(POETRY_VERSION ) ; \
5962 else \
60- INSTALLED_VERSION=$$(pip show poetry | grep Version | awk '{print $$2}' ) ; \
63+ INSTALLED_VERSION=$$(${PIP} show poetry | grep Version | awk '{print $$2}' ) ; \
6164 if [ " $$ INSTALLED_VERSION" != " $( POETRY_VERSION) " ]; then \
6265 echo " Updating Poetry to version $( POETRY_VERSION) ..." ; \
63- pip install --user --upgrade poetry==$(POETRY_VERSION ) ; \
66+ ${PIP} install --user --upgrade poetry==$(POETRY_VERSION ) ; \
6467 else \
6568 echo " Poetry version $( POETRY_VERSION) already installed." ; \
6669 fi ; \
6770 fi
6871
6972install-dependencies : # # Install all dependencies including extras
70- poetry install --all-extras
73+ $( POETRY ) install --all-extras
7174
7275install : install-poetry install-dependencies # # Install Poetry and dependencies
7376
@@ -81,7 +84,7 @@ check-license: ## Check license headers
8184 ./dev/check-license
8285
8386lint : # # Run code linters via pre-commit
84- poetry run pre-commit run --all-files
87+ $( POETRY ) run pre-commit run --all-files
8588
8689# ===============
8790# Testing Section
@@ -132,10 +135,10 @@ test-coverage: COVERAGE=1
132135test-coverage : test test-integration test-s3 test-adls test-gcs coverage-report # # Run all tests with coverage and report
133136
134137coverage-report : # # Combine and report coverage
135- poetry run coverage combine
136- poetry run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER )
137- poetry run coverage html
138- poetry run coverage xml
138+ ${POETRY} run coverage combine
139+ ${POETRY} run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER )
140+ ${POETRY} run coverage html
141+ ${POETRY} run coverage xml
139142
140143# ================
141144# Documentation
@@ -144,13 +147,13 @@ coverage-report: ## Combine and report coverage
144147# #@ Documentation
145148
146149docs-install : # # Install docs dependencies
147- poetry install --with docs
150+ ${POETRY} install --with docs
148151
149152docs-serve : # # Serve local docs preview (hot reload)
150- poetry run mkdocs serve -f mkdocs/mkdocs.yml
153+ ${POETRY} run mkdocs serve -f mkdocs/mkdocs.yml
151154
152155docs-build : # # Build the static documentation site
153- poetry run mkdocs build -f mkdocs/mkdocs.yml --strict
156+ ${POETRY} run mkdocs build -f mkdocs/mkdocs.yml --strict
154157
155158# ===================
156159# Project Maintenance
0 commit comments