#912·rye

Can't add relative path dependencies in virtual projects and pdm-backend projects

Author: blussCreated Mar 20, 2024Updated Jan 11, 2025

Steps to Reproduce

bash
mkdir relativebug
cd relativebug
rye init a
rye init main
cd main
rye add a --path ../a
# Added a @ file:///home/user/ryes/relativebug/main/../a as regular dependency

cd ..
rye init main2 --virtual
cd main2
rye add a --path ../a
# error: Failed to run uv compile error: Distribution not found at: file:///a

Expected Result

In rye 0.29, it adds the dependency "a @ file:///${PROJECT_ROOT}/../a", to the virtual project (here "main2"). Note that a virtual project like main2 or a build_system=pdm project behave the same way, they both use the PROJECT_ROOT relative paths.

Actual Result

Error message

# error: Failed to run uv compile error: Distribution not found at: file:///a

Version Info

rye 0.30.0 commit: 0.30.0 (c7cbdd955 2024-03-19) platform: linux (x86_64) self-python: [email protected] symlink support: true uv enabled: true

Stacktrace

No response