Skip to content

Commit d6e978c

Browse files
authored
Makefile: apply PYTHON_ARG override in all uv commands (#2735)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change Follow up to #2601 Apply `PYTHON_ARG` override to all `uv` commands` ## Are these changes tested? Yes Override to use python 3.13 ``` export PYTHON=3.13 make setup-venv make install make docs-serve ``` Unset override and verify it uses system default, python 3.12 ``` unset PYTHON make setup-venv make test ``` ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. --> No
1 parent c807124 commit d6e978c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ else
3232
endif
3333

3434
ifeq ($(COVERAGE),1)
35-
TEST_RUNNER = uv run python -m coverage run --parallel-mode --source=pyiceberg -m
35+
TEST_RUNNER = uv run $(PYTHON_ARG) python -m coverage run --parallel-mode --source=pyiceberg -m
3636
else
37-
TEST_RUNNER = uv run python -m
37+
TEST_RUNNER = uv run $(PYTHON_ARG) python -m
3838
endif
3939

4040
ifeq ($(KEEP_COMPOSE),1)
@@ -70,7 +70,7 @@ setup-venv: ## Create virtual environment
7070
uv venv $(PYTHON_ARG)
7171

7272
install-dependencies: setup-venv ## Install all dependencies including extras
73-
uv sync --all-extras
73+
uv sync $(PYTHON_ARG) --all-extras
7474

7575
install: install-uv install-dependencies ## Install uv and dependencies
7676

@@ -84,7 +84,7 @@ check-license: ## Check license headers
8484
./dev/check-license
8585

8686
lint: ## Run code linters via prek (pre-commit hooks)
87-
uv run prek run -a
87+
uv run $(PYTHON_ARG) prek run -a
8888

8989
# ===============
9090
# Testing Section
@@ -101,7 +101,7 @@ test-integration-setup: ## Start Docker services for integration tests
101101
docker compose -f dev/docker-compose-integration.yml kill
102102
docker compose -f dev/docker-compose-integration.yml rm -f
103103
docker compose -f dev/docker-compose-integration.yml up -d --wait
104-
uv run python dev/provision.py
104+
uv run $(PYTHON_ARG) python dev/provision.py
105105

106106
test-integration-exec: ## Run integration tests (excluding provision)
107107
$(TEST_RUNNER) pytest tests/ -m integration $(PYTEST_ARGS)
@@ -133,10 +133,10 @@ test-coverage: COVERAGE=1
133133
test-coverage: test test-integration test-s3 test-adls test-gcs coverage-report ## Run all tests with coverage and report
134134

135135
coverage-report: ## Combine and report coverage
136-
uv run coverage combine
137-
uv run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER)
138-
uv run coverage html
139-
uv run coverage xml
136+
uv run $(PYTHON_ARG) coverage combine
137+
uv run $(PYTHON_ARG) coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER)
138+
uv run $(PYTHON_ARG) coverage html
139+
uv run $(PYTHON_ARG) coverage xml
140140

141141
# ================
142142
# Documentation
@@ -145,13 +145,13 @@ coverage-report: ## Combine and report coverage
145145
##@ Documentation
146146

147147
docs-install: ## Install docs dependencies (included in default groups)
148-
uv sync --group docs
148+
uv sync $(PYTHON_ARG) --group docs
149149

150150
docs-serve: ## Serve local docs preview (hot reload)
151-
uv run mkdocs serve -f mkdocs/mkdocs.yml
151+
uv run $(PYTHON_ARG) mkdocs serve -f mkdocs/mkdocs.yml
152152

153153
docs-build: ## Build the static documentation site
154-
uv run mkdocs build -f mkdocs/mkdocs.yml --strict
154+
uv run $(PYTHON_ARG) mkdocs build -f mkdocs/mkdocs.yml --strict
155155

156156
# ===================
157157
# Project Maintenance

0 commit comments

Comments
 (0)