Skip to content

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Jan 29, 2026

Rationale for this change

This PR lets uv manage the virtual env. uv will only setup a new venv if it does not exist and sync dep only when necessary.
This should make the entire make install process a lot faster and easier to work with

Context

I noticed running make install when a .venv already existed would show an interactive prompt:

➜  make install
uv is already installed.
uv venv 
Using CPython 3.12.11 interpreter at: /Users/kevinliu/.pyenv/versions/3.12.11/bin/python3
Creating virtual environment at: .venv
? A virtual environment already exists at `.venv`. Do you want to replace it? [y/n] › yes

hint: Use the `--clear` flag or set `UV_VENV_CLEAR=1` to skip this prompt

We dont need this prompt. And more crucially, claude keeps on getting stuck on this prompt 😞

Are these changes tested?

Yes running make install repeatedly

Are there any user-facing changes?

Copy link
Contributor

@rambleraptor rambleraptor left a comment

Choose a reason for hiding this comment

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

This is a fantastic change! uv sync can be a very costly operation.

...especially if you're on a containerized environment where you might have a timeout to stand up a service (yes, I ran into a situation on a different project an hour ago)

@kevinjqliu kevinjqliu force-pushed the kevinjqliu/fix-make-install branch from 20ceaf7 to d017475 Compare January 29, 2026 16:47
Comment on lines +70 to +72
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 \
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

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

@kevinjqliu kevinjqliu requested review from Fokko and geruh and removed request for geruh January 29, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants