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

Show direct dependencies with uv pip compile #2160

Closed
jmbond opened this issue Mar 4, 2024 · 4 comments
Closed

Show direct dependencies with uv pip compile #2160

jmbond opened this issue Mar 4, 2024 · 4 comments
Labels
compatibility Compatibility with a specification or another tool enhancement New feature or request

Comments

@jmbond
Copy link

jmbond commented Mar 4, 2024

Hello! Have you considered adding # via ... for direct dependencies as is currently done by pip-tools pip-compile?

Consider the following pyproject.toml:

[project]
name = "uv_test"
dynamic = ["version"]
dependencies = ["pandas", "numpy"]
$ uv pip compile -o requirements.txt pyproject.toml
Resolved 6 packages in 10ms
# This file was autogenerated by uv via the following command:
#    uv pip compile -o requirements.txt pyproject.toml
numpy==1.26.4
    # via pandas
pandas==2.2.1
python-dateutil==2.9.0.post0
    # via pandas
pytz==2024.1
    # via pandas
six==1.16.0
    # via python-dateutil
tzdata==2024.1
    # via pandas
$ pip-compile -o requirements.txt pyproject.toml
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
#    pip-compile --output-file=requirements.txt pyproject.toml
#
numpy==1.26.4
    # via
    #   pandas
    #   uv_test (pyproject.toml)
pandas==2.2.1
    # via uv_test (pyproject.toml)
python-dateutil==2.9.0.post0
    # via pandas
pytz==2024.1
    # via pandas
six==1.16.0
    # via python-dateutil
tzdata==2024.1
    # via pandas

As you can see, pip-compile adds # via uv_test (pyproject.toml) for the direct dependencies. I think it is useful to add this information to the requirements.txt file.

$ uv --version
uv 0.1.13
$ pip-compile --version
pip-compile, version 7.4.0
@zanieb zanieb added compatibility Compatibility with a specification or another tool enhancement New feature or request labels Mar 4, 2024
@charliermarsh
Copy link
Member

I believe this is the same as #1343 (just with a pyproject.toml instead of a requirements.txt), gonna merge into that issue.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@jmbond
Copy link
Author

jmbond commented Mar 4, 2024

You are indeed correct @charliermarsh. Sorry for not finding that issue.

@charliermarsh
Copy link
Member

No prob.

@charliermarsh
Copy link
Member

Supported in the next version via #3269.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants