Skip to content

Commit de9398d

Browse files
chore(package): Update package server to use UV
Also fix version_updater regex
1 parent c63f240 commit de9398d

3 files changed

Lines changed: 11 additions & 42 deletions

File tree

misc/version_updater.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ def set_tool_version(tool: Tool, version: str) -> None:
334334
Tool.Uv: [
335335
ReplaceRegex(r"uv >=[0-9.]+", "uv >={version}"),
336336
ReplaceRegex(
337-
r"curl -LsSf https://astral\.sh/uv/.*/install\.sh | sh",
338-
"curl -LsSf https://astral.sh/uv/{version}/install.sh",
337+
r"https://astral\.sh/uv/.*/install\.sh",
338+
"https://astral.sh/uv/{version}/install.sh",
339339
),
340340
],
341341
Tool.Node: [
@@ -419,8 +419,8 @@ def set_tool_version(tool: Tool, version: str) -> None:
419419
Tool.Rust: [RUSTUP_INSTALL],
420420
Tool.Uv: [
421421
ReplaceRegex(
422-
r"curl -LsSf https://astral\.sh/uv/.*/install\.sh | sh",
423-
"curl -LsSf https://astral.sh/uv/{version}/install.sh",
422+
r"https://astral\.sh/uv/.*/install\.sh",
423+
"https://astral.sh/uv/{version}/install.sh",
424424
)
425425
],
426426
},
@@ -430,8 +430,8 @@ def set_tool_version(tool: Tool, version: str) -> None:
430430
Tool.Python: [PYTHON_SMALL_VERSION],
431431
Tool.Uv: [
432432
ReplaceRegex(
433-
r"curl -LsSf https://astral\.sh/uv/.*/install\.sh | sh",
434-
"curl -LsSf https://astral.sh/uv/{version}/install.sh",
433+
r"https://astral\.sh/uv/.*/install\.sh",
434+
"https://astral.sh/uv/{version}/install.sh",
435435
)
436436
],
437437
},

server/packaging/server/in-docker-build.sh

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,15 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --defaul
77
export PATH="/root/.cargo/bin:$PATH"
88
cargo --version
99

10-
# Install Poetry
11-
curl -sSL https://install.python-poetry.org | python - --version=2.1.1
10+
# Install UV
11+
curl -LsSL https://astral.sh/uv/0.8.4/install.sh | sh
1212
export PATH="/root/.local/bin:$PATH"
13-
poetry --version
14-
# Install plugin for poetry export
15-
poetry self add poetry-plugin-export
13+
uv --version
1614

1715
# Install parsec in virtual env
1816
python -m venv venv
1917
. ./venv/bin/activate
2018

21-
# Installing the Python project is a bit tricky:
22-
# - `pip install .` ignores dependency pinning :(
23-
# - `poetry install` install the main project as a symlink in the virtualenv :(
24-
# So instead we ask poetry to generate a `requirements.txt` that contains the
25-
# pinned dependencies, then pip install this, and finally do a regular
26-
# `pip install .` that will only install our project given all dependencies are
27-
# already installed.
28-
29-
# Only keep dependencies from `main` group (i.e. the base dependencies), as other groups are for dev
30-
poetry --project ./server export --output requirements.txt --with=main
31-
# Install the dependencies...
32-
pip install -r ./requirements.txt
33-
# ...and our project
3419
# Compile in release mode
3520
# Also don't bundle OpenSSL shared library (it is already in the Docker image !)
3621
UV_LIBPARSEC_BUILD_PROFILE=release \

server/packaging/testbed-server/in-docker-build.sh

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,14 @@ export PATH="/root/.cargo/bin:$PATH"
88
cargo --version
99

1010
# Install Poetry
11-
curl -sSL https://install.python-poetry.org | python - --version=2.1.1
11+
curl -LsSL https://astral.sh/uv/0.8.4/install.sh | sh
1212
export PATH="/root/.local/bin:$PATH"
13-
poetry --version
14-
# Install plugin for poetry export
15-
poetry self add poetry-plugin-export
13+
uv --version
1614

1715
# Install parsec in virtual env
1816
python -m venv venv
1917
. ./venv/bin/activate
2018

21-
# Installing the Python project is a bit tricky:
22-
# - `pip install .` ignores dependency pinning :(
23-
# - `poetry install` install the main project as a symlink in the virtualenv :(
24-
# So instead we ask poetry to generate a `requirements.txt` that contains the
25-
# pinned dependencies, then pip install this, and finally do a regular
26-
# `pip install .` that will only install our project given all dependencies are
27-
# already installed.
28-
29-
# Only keep dependencies from `main` group (i.e. the base dependencies) and
30-
# testbed-server, as other groups are for dev
31-
poetry --project ./server export --output requirements.txt --with=main,testbed-server
32-
# Install the dependencies...
33-
pip install -r ./requirements.txt
34-
# ...and our project
3519
# Compile in CI mode to reduce size while still retain `test-utils` feature
3620
# Also don't bundle OpenSSL shared library (it is already in the Docker image !)
3721
UV_LIBPARSEC_BUILD_PROFILE=ci \

0 commit comments

Comments
 (0)