Skip to content

Commit a83b045

Browse files
committed
Simplify UV preseed examples - remove unnecessary settings
When using UV with UV_PYTHON explicitly set, PYTHON_MIN_VERSION and PRIMARY_PYTHON are not needed. Updated examples to show minimal configuration and explain when each setting is required.
1 parent 7c9b797 commit a83b045

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

docs/source/preseeds.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ topics:
1515
core:
1616
# include domain mxenv
1717
mxenv:
18-
# set PYTHON_MIN_VERSION, PYTHON_PACKAGE_INSTALLER and UV_PYTHON
19-
PYTHON_MIN_VERSION: 3.14
18+
# Minimal UV configuration - UV downloads Python automatically!
2019
PYTHON_PACKAGE_INSTALLER: uv
2120
UV_PYTHON: "3.14"
2221
qa:
@@ -48,13 +47,26 @@ When using UV, you should explicitly set `UV_PYTHON` to specify which Python ver
4847
The `UV_PYTHON` setting accepts version specs like `3.13`, `3.14`, or `cpython@3.14`:
4948

5049
```yaml
50+
# Minimal UV configuration (recommended)
5151
topics:
5252
core:
5353
mxenv:
54-
PYTHON_MIN_VERSION: "3.14"
55-
PRIMARY_PYTHON: python3
5654
PYTHON_PACKAGE_INSTALLER: uv
57-
UV_PYTHON: "3.14" # Explicitly specify Python version for UV
55+
UV_PYTHON: "3.14" # UV downloads this Python version
56+
```
57+
58+
**Note**: When using UV with `UV_PYTHON` explicitly set:
59+
- `PYTHON_MIN_VERSION` is **not needed** (validation skipped with global UV)
60+
- `PRIMARY_PYTHON` is **not needed** (only used if UV_PYTHON is not set)
61+
62+
For traditional pip-based workflows, you would set:
63+
```yaml
64+
# Traditional pip configuration (requires Python pre-installed)
65+
topics:
66+
core:
67+
mxenv:
68+
PRIMARY_PYTHON: python3.12
69+
PYTHON_PACKAGE_INSTALLER: pip # default
5870
```
5971

6072
## Examples
@@ -77,14 +89,13 @@ Enter the `hello-world-` directory and create a file `preseed.yaml`:
7789
topics:
7890
core:
7991
mxenv:
80-
PYTHON_MIN_VERSION: "3.14"
8192
PYTHON_PACKAGE_INSTALLER: uv
82-
UV_PYTHON: "3.14"
93+
UV_PYTHON: "3.14" # UV downloads Python 3.14
8394
sources:
8495
qa:
85-
ruff
86-
mypy
87-
test
96+
ruff:
97+
mypy:
98+
test:
8899
89100
mx-ini: true
90101
```

0 commit comments

Comments
 (0)