[Python] Specifying local relative dependency in pyproject.toml

Discussão em 'Python' iniciado por Stack, Agosto 31, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following project structure:

    root
    - sample/
    - src/
    - tests/
    - pyproject.toml
    - libs/
    - lol/
    - src/
    - tests/
    - pyproject.toml


    I'd like to specify lol as a dependency for sample in sample/pyproject.toml. How it can be done? I've tried:

    dependencies = [
    "lol @ file://libs/lol"
    ]


    But it gives me:

    ValueError: non-local file URIs are not supported on this platform: 'file://libs/lol'


    and that's ok however I cannot put absolute path here since this is going to be shared code. Same for file://./lib/lol.

    What can be done about that? Can I use env variables here, or some placeholders? I don't want to use tools like poetry.

    Continue reading...

Compartilhe esta Página