Skip to content

Add dedicated error message for dependencies with relative paths #9683

@charliermarsh

Description

@charliermarsh

Given:

[project]
name = "foo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13.0"
dependencies = ["foo @ ./scripts/path"]

Running uv pip install -r pyproject.toml gives you:

error: Failed to parse metadata from built wheel
  Caused by: relative path without a working directory: ./scripts/path
foo@ ./scripts/path
     ^^^^^^^^^^^^^^

I think this is common enough that we should map the error to something that explains that you can't have relative paths here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesMessaging when something goes wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions