hundreds-carpet-28072
10/20/2025, 4:12 PMuv lockfiles and converting the output into Pex lockfiles. Does Pants support the [dependency-groups] fields in pyproject.toml in any way? It would be useful to be able to generate separate resolves from these as I have in the past for dependencies related to: test, tools, docs etc.numerous-pharmacist-91083
10/20/2025, 7:46 PMuv for dependency resolution but, I gather, Pants doesn't support that yet. Can you explain a bit more about how you're making this work?hundreds-carpet-28072
10/21/2025, 8:24 AMuv pip compile (including all exposed distribution parameters, see example command below), but I can say with 95% confidence that it’s not possible to convert from the outputted pylock.toml file to a pex.lock file in this way due to some missing fields that are exposed via uv lock but not uv pip compile. Most notably the Requires-Dist field of Python wheels/bdists that is queried in both commands but not exposed in the final output, which is used by the pex.lock file.
uv pip compile ${requirements_file} --output-file ${uv_lockfile} \
-q --universal --index-strategy unsafe-best-match \
--generate-hashes --no-strip-markers --no-strip-extras
I also saw some difficulty due to the fact that we support multiple Python versions, unlike Alex’s system - but I got around that with a bit of hackery converting environment markers (python_full_version) to Requires-Python fields.elegant-florist-94385
10/21/2025, 1:56 PMresolve field, and as far as I understand poetry_requirements and python_requirements are both just macros that generate an individual python_requirement target for each entry. Even if dependency groups isn't used by pants, I'd expect something like:
poetry_requirements(
source="pyproject.shared.toml",
resolve=parametrize("resolveA", "resolveB"),
)
poetry_requirements(
source="pyproject.resolveA.toml"
resolve="resolveA",
)
poetry_requirements(
source="pyproject.resolveB.toml"
resolve="resolveB",
)
to still work, mirroring how you might use multiple requirements.txt for multiple resolves.hundreds-carpet-28072
10/21/2025, 3:24 PMpyproject.toml file, not separate ones. This includes dependency groups for test/tools/docs dependencies that make sense to have their own resolve but afaik there’s notway to programmatically declare or generate resolves per dependency group of pyproject.toml in BUILD files?