Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editable dependency in dev environment only, and source the git version in packaging environment #9537

Closed
choucavalier opened this issue Nov 30, 2024 · 2 comments

Comments

@choucavalier
Copy link

Hello! Thanks for the awesome work on uv. The amount of things you're getting right and the speed of your development team is inspiring!

Say I have a package foo and another package bar that I'm both developing.

bar depends on foo.

In my dev environment, I'll have a local version of both foo and bar that I'm working on.

./devel/foo
./devel/bar

Each package has its own pyproject.toml. foo itself has some optional dependencies and I want bar to depend on foo without the optional dependencies, because foo is exposing some specific set of features to bar and has its own other functionalities that depend on heavy Python libraries that I definitely don't want to have as dependencies of bar.

While I'm working on bar, I want to have the foo dependency in editable mode.

But when I'm packaging bar, I want it to fetch the foo dependency from a git repositry.

In other words, I would like the dependency in the dev dependency group to be

[tool.uv.sources]
foo = { path = "../foo" }

And in the packaging environment (in the normal dependencies part of the pyproject.toml) to be

[tool.uv.sources]
foo = { git = "ssh://[email protected]:myorg/mypackage" }

Right now, if I add foo as a dependency in either, it's gonna overwrite the other version.

What's the right way to manage this situation with uv?

@zanieb
Copy link
Member

zanieb commented Dec 3, 2024

Is this about the same as #7945 ?

@choucavalier
Copy link
Author

@zanieb very much looks like so, thanks for pointing it out: it did not came up in my searches on the issue tracker. closing this in favor of the existing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants