-
Notifications
You must be signed in to change notification settings - Fork 885
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
uv does not recognize dependencies declared in script #6700
Comments
I agree that this should work, at least from the above description. |
I presume the problem here is that we're not respecting |
The problem is the break in the script -- try this: # /// script
# requires-python = ">=3.12"
# dependencies = [
# "cyclonedds ==0.11.0",
# ]
#
# [tool.uv]
# index-strategy = "unsafe-best-match"
#
# [tool.uv.sources]
# cyclonedds = { git = "https://github.com/eclipse-cyclonedds/cyclonedds-python.git", rev = "080dfd4b26e4c4dc2529694ef9cf9589750360c1" }
#
# ///
import cyclonedds as dds
print("Hello, World!") |
I need to review the spec to see what the correct behavior is. |
Ah gotcha... I wonder if we can / should warn here? We could document it, at least. |
Okay, it is correct to reject that per the spec:
But I think we should warn if we see |
That worked! Thanks! FYI: The break was introduced when I first ran the following command: |
Ohh nice, now that is a bug! |
Should this be user-facing by default? It seems annoying because then it's unavoidable if you (for whatever reason) have an intentionally unclosed tag. Motivated by #6700.
## Summary We were writing empty lines between the dependencies and the `tool.uv.sources` table, which led to the `/// script` tag being unclosed and thus not recognized. Closes #6700.
Howdy and thanks for a great piece of software! I'm not sure if this is a bug or if I'm simply doing things wrong. Anyway..
When I run the following piece of python:
With command:
CYCLONEDDS_HOME=~/.local uv -v run test.py
I get the following error:
However, if I run the following:
uv venv && CYCLONEDDS_HOME=~/.local uv pip install git+https://github.com/eclipse-cyclonedds/cyclonedds-pytho n@080dfd4b26e4c4dc2529694ef9cf9589750360c1 && uv run test.py
, everything works.As stated earlier, this might be the intended behavior, but I'm not sure.
The current uv platform.
Linux (x86_64) Ubuntu 24.04
The current uv version (
uv --version
).uv 0.3.4
The text was updated successfully, but these errors were encountered: