Skip to content

Commit 7080f78

Browse files
committed
Document UV auto-detection and update to Python 3.14
- Removed obsolete MXENV_UV_GLOBAL from all preseed examples - Added UV Package Installer sections explaining auto-detection - Documented new UV_PYTHON setting with version spec examples - Added warnings that UV_PYTHON defaulting to PRIMARY_PYTHON is backward compatibility only and should be explicitly set - Updated all examples to use Python 3.14 (3.13 for Plone) - All preseed examples now explicitly set UV_PYTHON
1 parent c101a29 commit 7080f78

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

docs/source/getting-started.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,23 @@ For details read the chapter [on topics and it's domains](topics-and-domains).
6363
Do not add custom settings to settings section.
6464
They will be lost on next `mxmake init` respective `mxmake update` run.
6565

66+
### Python Package Installer
67+
68+
By default, mxmake uses `pip` as the package installer. You can switch to [UV](https://docs.astral.sh/uv/) by setting `PYTHON_PACKAGE_INSTALLER=uv` in the settings section.
69+
70+
When using UV, mxmake automatically detects if UV is installed globally or installs it locally in the virtual environment.
71+
72+
```{note}
73+
When using UV, you should explicitly set `UV_PYTHON` to specify which Python version UV should use. While `UV_PYTHON` currently defaults to `PRIMARY_PYTHON` for backward compatibility, this default may change in future versions. Set `UV_PYTHON` explicitly to avoid surprises.
74+
```
75+
76+
Example:
77+
```makefile
78+
PRIMARY_PYTHON?=python3
79+
PYTHON_PACKAGE_INSTALLER?=uv
80+
UV_PYTHON?=3.14
81+
```
82+
6683
## How to use on the Windows operating system
6784

6885
mxmake works excellent on Windows!

docs/source/preseeds.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ topics:
1515
core:
1616
# include domain mxenv
1717
mxenv:
18-
# set PYTHON_MIN_VERSION and PYTHON_PACKAGE_INSTALLER
19-
PYTHON_MIN_VERSION: 3.10
18+
# set PYTHON_MIN_VERSION, PYTHON_PACKAGE_INSTALLER and UV_PYTHON
19+
PYTHON_MIN_VERSION: 3.14
2020
PYTHON_PACKAGE_INSTALLER: uv
21+
UV_PYTHON: "3.14"
2122
qa:
2223
# include domains from qa topic but do not override default settings
2324
ruff:
@@ -36,6 +37,26 @@ Now initialize the project with the preseeds:
3637
$ mxmake init -p preseeds.yaml
3738
```
3839

40+
## UV Package Installer
41+
42+
When `PYTHON_PACKAGE_INSTALLER` is set to `uv`, mxmake automatically detects whether UV is installed globally on your system.
43+
44+
```{important}
45+
When using UV, you should explicitly set `UV_PYTHON` to specify which Python version UV should use. While `UV_PYTHON` currently defaults to `PRIMARY_PYTHON` for backward compatibility, relying on this default is not recommended and may change in future versions.
46+
```
47+
48+
The `UV_PYTHON` setting accepts version specs like `3.13`, `3.14`, or `[email protected]`:
49+
50+
```yaml
51+
topics:
52+
core:
53+
mxenv:
54+
PYTHON_MIN_VERSION: "3.14"
55+
PRIMARY_PYTHON: python3
56+
PYTHON_PACKAGE_INSTALLER: uv
57+
UV_PYTHON: "3.14" # Explicitly specify Python version for UV
58+
```
59+
3960
## Examples
4061
4162
### Create a simple Python project
@@ -56,8 +77,9 @@ Enter the `hello-world-` directory and create a file `preseed.yaml`:
5677
topics:
5778
core:
5879
mxenv:
59-
PYTHON_MIN_VERSION: "3.10"
80+
PYTHON_MIN_VERSION: "3.14"
6081
PYTHON_PACKAGE_INSTALLER: uv
82+
UV_PYTHON: "3.14"
6183
sources:
6284
qa:
6385
ruff
@@ -102,8 +124,9 @@ topics:
102124
base:
103125
RUN_TARGET: zope-start
104126
mxenv:
105-
PYTHON_MIN_VERSION: "3.10"
127+
PYTHON_MIN_VERSION: "3.13"
106128
PYTHON_PACKAGE_INSTALLER: uv
129+
UV_PYTHON: "3.13"
107130
applications:
108131
zope:
109132
plone:

0 commit comments

Comments
 (0)