Skip to content

find-links causing local wheel path to expand to absolute path when creating lockfile #6458

@rseeley

Description

@rseeley

I'm working in a repo that uses several wheels for the same package, each one targeting a different architecture, stored in a directory local to the repo (packages/package-a). I'm using uv 0.3.1 and am on a Mac (M1). To accomplish installing the package across environments, I'm using the following setup in pyproject.toml:

dependencies = [
  "package-a>=0.1.2,<1.0.0"
]

[tool.uv]
find-links = [
  "packages/package-a"
]

This allows uv to discover the wheel properly, but when creating a uv.lock file with uv lock, it expands the file path to the absolute path on my system. This breaks portability when sharing amongst a team and when in CI. I'm wondering if this can be updated to be relative? I've tried doing file:///packages/package-a andfile:///./packages/package-a and neither seem to work in find-links, giving me the error

error: Failed to read `--find-links` directory: /packages/package-a
  Caused by: failed to read directory `/packages/package-a`
  Caused by: No such file or directory (os error 2)

I also tried file://./packages/package-a and got

error: Expected a file URL, but received: file://./packages/package-a

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions