mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-24 13:32:25 +00:00
feat(tools): migrate to UV from Poetry for blazing fast ultra safe secure unhackable dependency management 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
This commit is contained in:
19 files changed
+2759
-2676
No files matched your search
@@ -5,7 +5,7 @@ set -euo pipefail
|
||||
|
||||
cd /src
|
||||
|
||||
export POETRY_VERSION="${POETRY_VERSION:-2.3.4}"
|
||||
export UV_VERSION="${UV_VERSION:-0.11.12}"
|
||||
export PNPM_VERSION="${PNPM_VERSION:-10.33.0}"
|
||||
|
||||
apt-get update -y
|
||||
@@ -37,7 +37,7 @@ curl -fsSL "https://github.com/go-task/task/releases/download/v${TASK_VER}/task_
|
||||
corepack enable
|
||||
corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
|
||||
bash scripts/ci/github-install-poetry.sh
|
||||
bash scripts/ci/github-install-uv.sh
|
||||
|
||||
export TRIVY_SBOM=0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Python (Poetry) and Node (pnpm) dependencies for native Electron builds.
|
||||
# Install Python (UV) and Node (pnpm) dependencies for native Electron builds.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
@@ -28,13 +28,13 @@ if [[ "$(uname -s)" == "Linux" ]] && command -v apt-get >/dev/null 2>&1; then
|
||||
run_priv apt-get install -y libopus0 libogg0
|
||||
fi
|
||||
|
||||
python -m poetry check --lock
|
||||
python -m poetry install --no-interaction --no-ansi --with dev
|
||||
python -m poetry run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
uv lock --check
|
||||
uv sync --group dev
|
||||
uv run python scripts/patch_lxst_pyogg_ogg_ctypes.py
|
||||
|
||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||
if poetry run python -c "import platform, sys; sys.exit(0 if platform.machine() == 'arm64' else 1)"; then
|
||||
_miniaudio_state="$(poetry run python -c "
|
||||
if uv run python -c "import platform, sys; sys.exit(0 if platform.machine() == 'arm64' else 1)"; then
|
||||
_miniaudio_state="$(uv run python -c "
|
||||
import importlib.util
|
||||
import pathlib
|
||||
import subprocess
|
||||
@@ -78,10 +78,10 @@ else:
|
||||
export ARCHFLAGS="-arch arm64"
|
||||
export CFLAGS="-arch arm64"
|
||||
export CXXFLAGS="-arch arm64"
|
||||
poetry run python -m pip install --force-reinstall --no-cache-dir --no-binary miniaudio "miniaudio>=1.70,<2"
|
||||
uv run python -m pip install --force-reinstall --no-cache-dir --no-binary miniaudio "miniaudio>=1.70,<2"
|
||||
)
|
||||
fi
|
||||
if ! poetry run python -c "
|
||||
if ! uv run python -c "
|
||||
import importlib.util
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Poetry from PyPI with an explicit version (no third-party installers).
|
||||
# Set POETRY_VERSION to override the default.
|
||||
set -euo pipefail
|
||||
|
||||
POETRY_VERSION="${POETRY_VERSION:-2.3.4}"
|
||||
|
||||
python -m pip install --disable-pip-version-check --upgrade pip
|
||||
python -m pip install --disable-pip-version-check "poetry==${POETRY_VERSION}"
|
||||
python -m poetry --version
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install UV (Python package manager) from PyPI with an explicit version.
|
||||
# Set UV_VERSION to override the default.
|
||||
set -euo pipefail
|
||||
|
||||
UV_VERSION="${UV_VERSION:-0.11.12}"
|
||||
|
||||
python -m pip install --disable-pip-version-check --upgrade pip
|
||||
python -m pip install --disable-pip-version-check "uv==${UV_VERSION}"
|
||||
uv --version
|
||||
Reference in new issue
Block a user