E534 fix: redirect only error output from makefile command to do not install uv if already present on system by raulcd · Pull Request #2742 · apache/iceberg-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@raulcd
Copy link
Member
@raulcd raulcd commented Nov 12, 2025

Closes #2741

Rationale for this change

make install is currently trying to install uv even when is present locally:

$ make install
uv not found. Installing...
/home/raulcd/.local/bin/uv
^Cmake: *** [Makefile:62: install-uv] Interrupt

$ uv --version
uv 0.9.7

Are these changes tested?

No, only validated locally on Debian 14 that it does not try to install:

$ PYTHON=3.12 make install
/home/raulcd/.local/bin/uv
uv is already installed.
uv venv --python 3.12
Using CPython 3.12.12
Creating virtual environment at: .venv

And validated in a clean docker container that if uv is not present it installs it:

root@9e4870fda91e:/app/iceberg-python# make install
uv not found. Installing...
downloading uv 0.9.8 x86_64-unknown-linux-gnu
no checksums to verify
installing to /root/.local/bin

Are there any user-facing changes?

No

@kevinjqliu
Copy link
Contributor

hey @raulcd curious which shell are you using? im using zsh and not im seeing this behavior

this change will output an extra /Users/kevinliu/.local/bin/uv when i run make install-uv

@raulcd
Copy link
Member Author
raulcd commented Nov 13, 2025

hey @raulcd curious which shell are you using? im using zsh and not im seeing this behavior

That's curious, I'm using bash. My Makefile skills are slightly rusty but, as I can reproduce, I can keep investigating and find a different approach that works with both bash and zsh.

Copy link
Contributor
@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

coming back to this, this is the LLM suggested solution. Does this work in your local env?


install-uv: ## Ensure uv is installed
@if ! command -v uv &> /dev/null; then \
@if ! command -v uv 2> /dev/null; then \
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@if ! command -v uv 2> /dev/null; then \
@if ! command -v uv > /dev/null 2>&1; then \

&> is bash-specific syntax. > /dev/null 2>&1 is POSIX-compliant and works across all shells, ensuring the Makefile is portable to systems where /bin/sh isn't bash (like Ubuntu's dash).

Same behavior, better compatibility.

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.

make install tries to install uv even when uv is present

2 participants

0