这是indexloc提供的服务,不要输入任何密码
Skip to content

[python] Move UV to a dev dependency #27707

@FawazTirmizi

Description

@FawazTirmizi

Description

Currently UV is included in the main dependency list of Opentitan1. This causes any projects that depend on Opentitan to also pull down the UV version. As a result, if a user of a downstream dependency that uses UV is in a virtual environment and then tries to invoke UV, they will get the UV from Opentitan rather than the one in their environment, which could be externally managed. There are also some other things, like linters, which don't have to be core dependencies.

Frankly I don't see the point in pinning uv in the pyproject.toml as you presumably require using UV to parse it in the first place, but if you must it would be a better fit for a dev dependency2. For example:

[dependency-groups]
dev = [
    "uv ~= 0.7.14",
    # Any other dependencies you want (e.g. your linters)
]

All that being said I'm not very familiar with OpenTitan's Python development methodologies so if this is necessary I apologize for the noise, but as a downstream consumer a solution would be much appreciated :).

I'm happy to handle making the changes if a solution can be agreed upon. Thanks!

CC @sameo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions