mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
fix: reoslve the uv issue
This commit is contained in:
@@ -194,7 +194,7 @@ def test_cmd_options(parser):
|
||||
def test_cmd(args, out):
|
||||
"""Run local and online tests for chatmail deployment.
|
||||
|
||||
This will automatically pip-install 'deltachat' if it's not available.
|
||||
This will automatically uv-pip-install 'deltachat' if it's not available.
|
||||
"""
|
||||
|
||||
x = importlib.util.find_spec("deltachat")
|
||||
|
||||
@@ -13,7 +13,7 @@ from pyinfra import facts, host, logger
|
||||
from pyinfra.api import FactBase
|
||||
from pyinfra.facts.files import Sha256File
|
||||
from pyinfra.facts.systemd import SystemdEnabled
|
||||
from pyinfra.operations import apt, files, pip, server, systemd
|
||||
from pyinfra.operations import apt, files, server, systemd
|
||||
|
||||
from cmdeploy.cmdeploy import Out
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ steps. Please substitute it with your own domain.
|
||||
mta-sts.chat.example.org. 3600 IN CNAME chat.example.org.
|
||||
|
||||
2. On your local PC, clone the repository and bootstrap the Python
|
||||
virtualenv.
|
||||
environment using ``uv``.
|
||||
|
||||
::
|
||||
|
||||
|
||||
11
init.sh
11
init.sh
@@ -7,11 +7,20 @@ sudo apt update
|
||||
sudo apt install -y git curl wget python3-dev gcc python3 nano sed
|
||||
|
||||
# 1.1 Install uv
|
||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||
if ! command -v uv &> /dev/null; then
|
||||
if [ -f "/root/.local/bin/uv" ]; then
|
||||
export PATH="/root/.local/bin:$PATH"
|
||||
elif [ -f "$HOME/.local/bin/uv" ]; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v uv &> /dev/null; then
|
||||
echo "--- Installing uv ---"
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
# Ensure uv is in PATH for the current script
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
# 2. Clone the repository if not already in it
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Wrapper for building the docs
|
||||
set -e
|
||||
# Ensure uv is in PATH
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||
|
||||
cd doc/
|
||||
uv run make html
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
# Wrapper for cmdelpoy to run it in activated virtualenv.
|
||||
set -e
|
||||
# Ensure uv is in PATH
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||
|
||||
uv run cmdeploy "$@"
|
||||
|
||||
@@ -19,7 +19,15 @@ if command -v lsb_release 2>&1 >/dev/null; then
|
||||
fi
|
||||
|
||||
# Ensure uv is in PATH
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
||||
|
||||
if ! command -v uv &> /dev/null; then
|
||||
if [ -f "/root/.local/bin/uv" ]; then
|
||||
export PATH="/root/.local/bin:$PATH"
|
||||
elif [ -f "$HOME/.local/bin/uv" ]; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v uv &> /dev/null; then
|
||||
echo "uv not found. Please install it first or run init.sh"
|
||||
|
||||
Reference in New Issue
Block a user