pdm icon indicating copy to clipboard operation
pdm copied to clipboard

pdm list 打印出的信息 有些反直觉

Open shifenhutu opened this issue 1 year ago • 2 comments

pyproject.toml

[project]
name = "flow-111"
version = "0.1.0"
description = "Default template for PDM package"

dependencies = [
    "curl-cffi>=0.7.3",
    "pydantic>=2.9.2",
    "jupyterlab>=4.2.5",
    "plotly>=5.24.1",
    "pandas>=2.2.3",
]
requires-python = "==3.12.*"
readme = "README.md"
license = {text = "MIT"}


[tool.pdm]
distribution = false

情况描述

当我使用 pdm list 的时候,列出了 几十个包,太多了, 其实我只想看看 我现在安装的包的版本号

image

期待的解决方案

pdm list 只检测出 在我 pyproject.toml 文件 的 dependencies配置里 的包 和它们的版本号, 可以通过添加参数 --include-sub 查看 包含子包的情况

参考

https://github.com/pdm-project/pdm/pull/3219

shifenhutu avatar Oct 20 '24 07:10 shifenhutu

pdm outdated 我觉得也可以这样处理 , 默认 只检测 dependencies 配置里 的包

shifenhutu avatar Oct 20 '24 07:10 shifenhutu

pdm 很多命令, 默认情况,建议只作用于 dependencies 配置里 的包, 可通过添加额外参数 --include-sub 来 包含 子包

shifenhutu avatar Oct 20 '24 07:10 shifenhutu

No, that is different, pdm list only cares about "what packages you have installed" and not about what dependencies you specified in the project. Like you can initialize an empty project with an existing venv and run pdm list to list what is installed in that venv. This has the same function as pip list or conda list.

frostming avatar Oct 21 '24 00:10 frostming