Skip to content

Build: Support building site with uv - #15118

Merged
kevinjqliu merged 1 commit into
apache:mainfrom
manuzhang:build-site-uv
Feb 16, 2026
Merged

kevinjqliu merged 1 commit into
apache:mainfrom
manuzhang:build-site-uv

Conversation

@manuzhang

@manuzhang manuzhang commented Jan 23, 2026 •

Copy link
Copy Markdown
Member

Currently, in the site build python script, both VENV_DIR and pip command are hard-coded, which prevents us from using uv to built site locally. To lift the limit, this PR exposes VENV_DIR and PIP as environment variables.

Run with uv using

PIP="uv pip" make serve-dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for building the Iceberg documentation site using uv, a modern Python package installer and resolver. The change makes the pip command configurable via an environment variable while maintaining backward compatibility with the existing pip-based workflow.

Changes:

  • Modified site/dev/common.sh to allow overriding the pip command via the PIP environment variable
  • Added .python-version to .gitignore (created by uv)

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
site/dev/common.sh Made the pip command configurable via PIP environment variable, defaulting to the existing venv pip3 path
.gitignore Added .python-version file to ignore list for uv compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/dev/common.sh

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the current change only allows overriding PIP in common.sh
there are a lot of places in the .sh files using ${VENV_DIR}/bin/python3, i actually want to replaced all of those with uv
similar to #14684 which was for open-api

Comment thread site/dev/common.sh Outdated
@manuzhang

Copy link
Copy Markdown
Member Author

the current change only allows overriding PIP in common.sh

Yes, it works for me to use uv as an alternative locally with export PIP="uv pip".

@kevinjqliu

Copy link
Copy Markdown
Contributor

we hardcode ${VENV_DIR}/ at a bunch of places right now.
https://grep.app/search?f.path=site%2Fdev%2F&f.repo=apache%2Ficeberg&f.repo.pattern=iceberg&q=%7BVENV_DIR%7D
i think if we want to override this specific instance, we should override all of them.

It might get confusing otherwise. For example, uv allows to create venv dir with different names, while the script is hardcoded to .venv

export VENV_DIR=".venv"

@manuzhang

Copy link
Copy Markdown
Member Author

@kevinjqliu VENV_DIR can be overridden now. Please take another look.

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks! i think the VENV_DIR change alone should allow using environment created by uv. wdyt?

imo to fully support "Build: Support building site with uv", we should change all the scripts currently using VENV_DIR/pip/pip3/python/python3 to uv commands

Comment thread site/dev/common.sh

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for catching me up on this. it makes sense, and being able to override pip with uv pip resolves deps much faster.

do you mind adding some context in the pr description?

Comment thread site/dev/common.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kevinjqliu
kevinjqliu merged commit 4c0db5a into apache:main Feb 16, 2026
10 checks passed
@kevinjqliu

Copy link
Copy Markdown
Contributor

Thanks for the PR @manuzhang !

@manuzhang
manuzhang deleted the build-site-uv branch March 2, 2026 07:21
RjLi13 pushed a commit to RjLi13/iceberg that referenced this pull request Mar 12, 2026
talatuyarer pushed a commit to talatuyarer/iceberg that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants