pipx install erroneously exposing binaries of dependencies despite no `--include-deps` switch
See original GitHub issueThis might already be possible, I couldn’t find out how however.
How would this feature be useful?
Currently when installing a package all of it’s included apps (dependencies?) are exposed to $PATH
, even though when I for instance want to install organize
using pipx install organize-tool
I really only want the organize
binary to be exposed. I assume (with my limited knowledge of python packages) that these apps are actually required for the main app but could also be contained to the venv and don’t need to be exposed to $PATH
.
What is actually installed is the following:
package organize-tool 1.9.1, Python 3.8.5
- EXIF.py
- activate-global-python-argcomplete
- docx2txt
- dumppdf.py
- latin2ascii.py
- organize
- pdf2txt.py
- python-argcomplete-check-easy-install-script
- python-argcomplete-tcsh
- register-python-argcomplete
- textract
I looked for a way to do this and thought I might be able to do so by editing the pipx_metadata.json
but unfortunately that doesn’t seem to be the case.
Describe the solution you’d like
Given that it’s probably not practical to determine which of the apps included is the main one it’d probably be better to make this configurable by the user themselves in for instance the pipx_metadata.json
Issue Analytics
- State:
- Created 3 years ago
- Comments:26 (16 by maintainers)
Top GitHub Comments
I believe I know what’s going on. I just stumbled upon this behavior and was about to file a bug report.
The problem is: When pipx installs package foo that depends on bar that has an entry point bar-cmd, if a bar-cmd program already exists in
PIPX_BIN_DIR
(e.g., if bar is already installed at the user level), then bar-cmd will be listed as a pipx-installed command in the output frompipx install
andpipx list
even though it is not. Fortunately, pipx has enough sense to not delete bar-cmd whenpipx uninstall foo
is run, which suggests that it can tell whether a given command is managed by pipx, it’s just not doing it in all cases.There was nothing about PIP or python in my env. If you’d want to it might be more informative to try it out on openSuSE Tumbleweed the distro which I’m running, I suppose it might be possible its got something to do with Tumbleweed itself although I think it’s doubtful. Otherwise I’ll try to debug some more myself once I’ve got some more free time.