From 7df3ae25851b99c7315a190e32e9d29662ab6875 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 27 Nov 2024 09:53:39 -0600 Subject: [PATCH] Add Python implementation example to limited resolution environments docs (#9475) Closes https://github.com/astral-sh/uv/issues/9473 --- docs/concepts/projects/config.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/concepts/projects/config.md b/docs/concepts/projects/config.md index 63cffc707..f22967be2 100644 --- a/docs/concepts/projects/config.md +++ b/docs/concepts/projects/config.md @@ -185,6 +185,15 @@ environments = [ ] ``` +Or, to exclude alternative Python implementations: + +```toml title="pyproject.toml" +[tool.uv] +environments = [ + "implementation_name == 'cpython'" +] +``` + Entries in the `environments` setting must be disjoint (i.e., they must not overlap). For example, `sys_platform == 'darwin'` and `sys_platform == 'linux'` are disjoint, but `sys_platform == 'darwin'` and `python_version >= '3.9'` are not, since both could be true at the