pdm
pdm copied to clipboard
Add option to `pdm remove` to only remove specified packages(s)
Is your feature request related to a problem? Please describe.
I want to reinstall a package though a manually built wheel, so I want to uninstall the package and reinstall it with pdm add ./<name of wheel>
. However pdm remove <package>
uninstalls not only the package, but every other package that now becomes an orphan.
Describe the solution you'd like
Maybe an option for pdm remove --only <package>
that only uninstalls that package, not anything else?
Do you agree that the environment should be kept in sync with the lock file and the lock file should be kept in sync with the pyproject.toml
dependencies? Then what do you think of this feature request?
Usually, yes -- that's why I asked for a switch as a special case. pdm sync
should then sync it properly.
Maybe it's possible to instead have an option to force sync one package only?
I got around this with pdm add -e ./<package>
, which is ideal for my needs, but there are some scenarios where I want to reinstall a wheel.
Maybe you could just remove the pypackages
of that module?
Every requested feature might be useful and can solve some problems of some people. The difficult part is to design the interface, trying to make the option not too specific and can interact with other commands or options in CLI. This is a process that needs extreme carefulness and some inspiration. Otherwise the CLI will become a stacking of independent functionalities and be hard to learn and memorize.
I am not rejecting the idea, but to excuse me for not replying this issue. At the same time, I believe it is not hard for you to delete the specific packages from __pypackages__/X.Y/lib
manually
PDM should not touch site-packages that are globally installed.