-
Notifications
You must be signed in to change notification settings - Fork 667
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
FR: Dynamic dependencies and optional dependencies #6422
Comments
chrisrodrigue
changed the title
Feat: Dynamic dependencies and optional dependencies
FR: Dynamic dependencies and optional dependencies
Aug 22, 2024
At least better for me than the current situation is having a warning / error when trying to use dynamic dependencies. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Greetings
uv
team and congratulations on the release of0.3
!I would like to present a rather vexing issue when it comes to project management.
As you may know, Anaconda has a significant presence in the realm of data science and scientific python usage. Currently,
conda
lags behind current PEP standards and does not support reading dependencies frompyproject.toml
. It is typically used by orgs that deploy to airgapped environments since it comes bundled with Anaconda alongside a number of other popular packages such aspytorch
.These orgs vastly prefer to use modern packaging tools like
uv
in non-airgapped development environments, but this requires carefully maintaining project dependencies for compatibility with Anaconda/conda
and avoidance of adding new runtime dependencies to the airgapped deployment environments.One such solution to avoid duplication of dependencies between conda
environment.yml
files and those definedpyproject.toml
is by utilizingrequirements.txt
in conjunction with dynamicproject.dependencies
(as seen in Drphoton’s answer here).This allows users to have a project layout like so:
and a
pyproject.toml
with dynamic dependency fields:This setup allows users to run
conda
in airgapped environments like so:while also letting them use
uv pip
in non-airgapped environments:uv pip install -e .
This approach places a dependency on
setuptools
to read the dynamic dependencies, and is admittedly just a stop-gap solution to make up for conda’s lack ofpyproject.toml
support.It would be nice if
uv
supported reading dynamic dependencies such that commands likeuv sync
would work if dependencies were defined in other files (such as split being across numerousrequirements.txt
).(Eagerly waiting to see if Astral ever offers a product similar to Anaconda that provides a number of high quality MIT-licensed python packages/python interpreter/uv/ruff/etc).
The text was updated successfully, but these errors were encountered: