Skip to content

✨ Enhance unpack scripts with uv auto-setup, venv reuse, and interactive python discovery#8

Open
entr0pia wants to merge 3 commits into
davnn:mainfrom
entr0pia:main
Open

✨ Enhance unpack scripts with uv auto-setup, venv reuse, and interactive python discovery#8
entr0pia wants to merge 3 commits into
davnn:mainfrom
entr0pia:main

Conversation

@entr0pia

@entr0pia entr0pia commented Mar 18, 2026

Copy link
Copy Markdown

...ractive python discovery

Description

This PR significantly improves the installation experience and performance of the offline bundles generated by uv-pack. Key enhancements include:

  1. Automatic uv Integration: Bundles the uv wheel into the wheels/ directory during packing. The unpack scripts now detect if uv is missing and
    automatically install it from the bundled wheel to enable high-speed installation in air-gapped environments.
  2. High-Performance Unpacking: Both unpack.sh and unpack.ps1 prioritize uv venv and uv pip install over legacy venv/pip when uv is available, drastically
    reducing deployment time.
  3. Interactive Python Discovery: If the Python bundling step is skipped and BASE_PY is not provided, the scripts will search for available system Python
    interpreters and interactively prompt the user for confirmation (defaulting to Y).
  4. Virtual Environment Reuse: Added a check for existing virtual environment directories. If a venv already exists, the script skips the creation step
    and proceeds directly to dependency synchronization.
  5. Documentation Alignment: Updated the root README.md, the internal script documentation, and SPEC.md to ensure all technical specifications and user
    guides match the new implementation.

Related Issue

N/A

Type of Change

  • 🔧 Bug fix
  • 🔐 Security fix
  • 🚀 Improvement / New feature
  • 📚 Examples / Docs / Tutorials

Checklist

  • I've checked the code using task check.
  • I've checked the repository using pre-commit.

@davnn

davnn commented May 2, 2026

Copy link
Copy Markdown
Owner

Hi, thanks for your contribution! I would like to gather some community feedback on this PR. This PR assumes that everyone wants to use uv for deployment, right? I currently prefer not to use uv in the deployment by default.

Should deployment with uv be the new default?
Should deployment without uv still be possible?
Should we add a CLI-option to enable/disable uv deployment?

@davnn davnn changed the title feat: enhance unpack scripts with uv auto-setup, venv reuse, and interactive python discovery ✨ Enhance unpack scripts with uv auto-setup, venv reuse, and interactive python discovery May 2, 2026
@entr0pia

Copy link
Copy Markdown
Author

I've updated the PR to make uv bundling optional during the packing phase (disabled by default). The unpacking scripts now follow a progressive enhancement strategy: they will still prioritize using uv (system-installed or bundled) if available for faster deployment, but will gracefully fallback to standard pip/venv if uv is not found. This ensures a 'clean' default while keeping the performance benefits accessible.

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.

2 participants