diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index be2ab64286..eb3f726563 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -62,7 +62,7 @@ jobs: - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos - name: Install - run: make install-dependencies + run: make install - name: Run linters run: make lint - name: Run unit tests with coverage diff --git a/Makefile b/Makefile index 7e67a981f7..22bcfd545b 100644 --- a/Makefile +++ b/Makefile @@ -66,17 +66,15 @@ install-uv: ## Ensure uv is installed echo "uv is already installed."; \ fi -setup-venv: ## Create virtual environment - uv venv $(PYTHON_ARG) - -install-dependencies: setup-venv ## Install all dependencies including extras - uv sync $(PYTHON_ARG) --all-extras --reinstall - -install-hooks: ## Install pre-commit hooks +install: install-uv ## Install uv, dependencies, and pre-commit hooks + uv sync $(PYTHON_ARG) --all-extras + @# Reinstall pyiceberg if Cython extensions (.so) are missing after `make clean` (see #2869) + @if ! find pyiceberg -name "*.so" 2>/dev/null | grep -q .; then \ + echo "Cython extensions not found, reinstalling pyiceberg..."; \ + uv sync $(PYTHON_ARG) --all-extras --reinstall-package pyiceberg; \ + fi uv run $(PYTHON_ARG) prek install -install: install-uv install-dependencies install-hooks ## Install uv, dependencies, and pre-commit hooks - # =============== # Code Validation # ===============