[PR #4129] [MERGED] core: add setup_uv() function to automate installation and updating of uv #4765

Open
opened 2025-11-20 06:11:34 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/4129
Author: @MickLesk
Created: 4/29/2025
Status: Merged
Merged: 4/29/2025
Merged by: @tremor021

Base: mainHead: MickLesk-patch-1


📝 Commits (1)

  • cbb9c76 core: tools.func - add uv setup

📊 Changes

1 file changed (+57 additions, -0 deletions)

View changed files

📝 misc/tools.func (+57 -0)

📄 Description

✍️ Description

What does this PR do?

  • Introduces a new function setup_uv() that automates the installation and updating of the uv package manager.
  • It fetches the latest uv release from GitHub, installs or updates it, and ensures /usr/local/bin is included in the $PATH.
  • Supports x86_64 and aarch64 architectures.

Why is this necessary?

  • uv is a fast and modern Python package manager that improves script performance and avoids system-wide pip modifications.
  • Manual installation of uv can be error-prone, especially in minimal or containerized environments where /usr/local/bin might not be in $PATH.

What are the benefits?

  • Ensures uv is installed and available without manual intervention.
  • Automatically keeps uv updated to the latest GitHub release.
  • Increases script reliability across Debian, Ubuntu, Alpine, and minimal Linux environments.

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/4129 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 4/29/2025 **Status:** ✅ Merged **Merged:** 4/29/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `MickLesk-patch-1` --- ### 📝 Commits (1) - [`cbb9c76`](https://github.com/community-scripts/ProxmoxVE/commit/cbb9c76bd7b705b541067a6c9fca14ba4583fe57) core: tools.func - add uv setup ### 📊 Changes **1 file changed** (+57 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `misc/tools.func` (+57 -0) </details> ### 📄 Description ## ✍️ Description ### What does this PR do? - Introduces a new function `setup_uv()` that automates the installation and updating of the `uv` package manager. - It fetches the latest `uv` release from GitHub, installs or updates it, and ensures `/usr/local/bin` is included in the `$PATH`. - Supports `x86_64` and `aarch64` architectures. ### Why is this necessary? - `uv` is a fast and modern Python package manager that improves script performance and avoids system-wide `pip` modifications. - Manual installation of `uv` can be error-prone, especially in minimal or containerized environments where `/usr/local/bin` might not be in `$PATH`. ### What are the benefits? - Ensures `uv` is installed and available without manual intervention. - Automatically keeps `uv` updated to the latest GitHub release. - Increases script reliability across Debian, Ubuntu, Alpine, and minimal Linux environments. ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [x] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 06:11:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#4765