Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@# is the syntax for comment. Using just # will have the sentence echo out when running make install

@if ! find pyiceberg -name "*.so" 2>/dev/null | grep -q .; then \
Comment on lines +70 to +72
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since uv sync is super fast, its fine to call it (potentially) twice

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense can't really think of a way around this until we deprecate cython (if...)

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
# ===============
Expand Down