[Python] How to uv add git repo with subpackages

Discussão em 'Python' iniciado por Stack, Julho 13, 2025.

  1. Stack

    Stack Membro Participativo

    I want to use uv to install packages and add dependencies, equivalent to the following pip workflow:

    git clone https://github.com/<username>/<repository>.git
    cd <repository>
    pip install -e .
    cd <repository>/<subpackage_1>
    pip install -e .
    cd ../<subpackage_2>
    pip install -e .
    ...


    Is there a simpler way to replicate this process using uv add, such as uv add git+https://github.com/<username>/<repository>.git? From my testing, it seems that uv add with a Git URL does not download any subpackages, and the --subdirectory option is not the right solution. Is there a recommended approach to achieve the same behavior with uv?

    Continue reading...

Compartilhe esta Página