`uv export` does not use relative paths for workspace members
### Description
When a child package (named “app”) within a workspace includes another child package (named “lib”) as a dependency, `uv export` does not resolve relative paths between directories.
When I run `uv export` in the “app” directory, it outputs `-e ./lib` instead of the expected `-e ../lib`.
(Is this the intended behavior?)
### Reproducible procedures and its output
### Commands to reproduce
```bash
uv init --bare
uv init --lib lib
uv init app
cd app
uv add lib@../lib
cat pyproject.toml
uv export --format requirements.txt --no-emit-project --no-hashes
```
### `pyproject.toml` in the child package `app`
```toml
[project]
name = "app"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"lib",
]
[tool.uv.sources]
lib = { workspace = true }
```
### Resulting `requirements.txt`-format output
```
# This file was autogenerated by uv via the following command:
# uv export --format requirements.txt --no-emit-project --no-hashes
-e ./lib
# via app
```
### Notes
`sam build` runs a command like this internally (which is executed from [`aws-lambda-builders`](https://github.com/aws/aws-lambda-builders):
```bash
uv export --format requirements.txt --no-emit-project --no-hashes --no-default-groups --output-file /tmp/path/to/lock_requirements.txt --python 3.13
uv pip install -r /tmp/path/to/lock_requirements.txt --target /path/to/deps/dir --cache-dir
```
0 条评论