pypa / pipx

Install and Run Python Applications in Isolated Environments
https://pipx.pypa.io
MIT License
10.23k stars 411 forks source link

pipx ensurepath --global doesn't update MANPATH #1453

Closed bernd-wechner closed 3 months ago

bernd-wechner commented 3 months ago

If you've written a Python system tool, that has a man page it's likely you have a setup.cfg (or the equivalent in setup.py or pyproject.toml) something like:

[options]
python_requires = >=3.10
scripts =
    src/mytool

[options.data_files]
share/man/man1 =
    man/mytool.1 

Now this man page is installed by pipx (presumably by pip underneath it) in the venv that pipx created, not in a system man folder. And man mytool does not work.

A simple solution is to update MANPATH when ensurepath is run, to include any man folder in the venv.

Another solution would be for pipx to ensure the man is installed in a system folder already in the default MANPATH.

dukecat0 commented 3 months ago

Which version of pipx are you using? I tried pipx install ranger-fm && man ranger and it works for me.

bernd-wechner commented 3 months ago

Actually it may just be a version issue. I think you're right/ Or a bungle mysides. Because I see in https://github.com/pypa/pipx/blob/main/src/pipx/paths.py Man paths are specified and probably used. I reckon I close this as confusion on my part somehow.