Open ghost opened 2 months ago
I vaguely remember trying something like this on my monorepo, try adding the main lib's git dependency as a --dev
dependency on the submodules, and have the submodules on the [tool.rye.workspace]
of the main pyproject.toml
I've then since moved to just warning that a repo shouldn't be cloned alone, and grab the latest PyPI version of every dependent package, at a risk of not working, but git dev deps should work if using rye as a manager (users would pip install .
or poetry install
submodules clone and won't work anyways due lack of consensus of how to define dev dependencies on pyproject.toml...)
Hi, maybe my approach is bad but basically I want to manage a monorepo with
rye
.I have several libraries, some of which depend on each other, but I want to keep the libraries separate (in my case they are
git
submodules). So it should be possible to install a library, let's called itpackage_1
from a remote location (e.g. GitHub) and if that library depends on another library that I manage, it should also fetch that library from the remote location (e.g. I have added a dependency withrye add package_2 --git=https://github.com/username/package_2
).In the case above my monorepo would look like this:
Now as there are two sources in monorepo for this particular library
package_2
, locally atmonorepo/libs/package_2
and remotely athttps://github.com/username/package_2
, I run into problems.It seems
rye
cannot handle this use case, not sure if this is a bug (or missing feature) on therye
side or if my approach is bad. Any help would be appreciated!Steps to Reproduce
rye init --virtual monorepo
cd monorepo && mkdir libs
rye init libs/package_1 && rye init libs/package_2
package_2
to a remote (e.g. GitHub)package_1
:cd libs/package_1 && rye add package_2 --git=https://github.com/username/package_2
rye sync
Expected Result
No errors,
rye
will use the local repository (or the remote) as default.Actual Result
Version Info
Stacktrace
No response