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

Provide entrypoint for successful pipx installation #2941

Open
Gitznik opened this issue Jan 25, 2024 · 2 comments
Open

Provide entrypoint for successful pipx installation #2941

Gitznik opened this issue Jan 25, 2024 · 2 comments

Comments

@Gitznik
Copy link

Gitznik commented Jan 25, 2024

Runtime Environment

  • Operating system and version: macos 13.6.3
  • Terminal emulator and version: macos terminal
  • Python version: 3.12.1
  • Ranger version/commit: 1.9.3
  • Locale:

Current Behavior

Hey there,

currently this tool cannot be invoked via pipx, if pipx bases its virtual environments in a path that contains spaces, which is the default on mac, as per the mac documentation. This is the case since pipx 1.3.

The solution is to provide a entry point, see the pipx docs.

As you recommend installing this tool via pipx, it would be great if you could update your package accordingly.

Thanks!

based on pypa/pipx#1212

Expected Behavior

Entrypoint available so the package can be installed correctly, even if the venv is in a path with spaces.

Context

This was reported in pipx under this issue: pypa/pipx#1226

Possible Solutions

Provide an entrypoint definition.

Steps to reproduce

  1. Set the PIPX_HOME environment variable to a path with spaces
  2. pipx install ranger-fm
  3. ranger -> fails because the shebang of the ranger executable contains a space

Traceback


@toonn
Copy link
Member

toonn commented Jun 7, 2024

This strictly sounds like a Pipx issue. It should escape paths it injects properly.

If this remains an issue I'd drop the Pipx recommendation instead.

@Gitznik
Copy link
Author

Gitznik commented Jun 9, 2024

It's a pip issue, actually. pipx has nothing to do with these files. This problem also occurs if a user manually installs ranger via pip into a venv that resides in a path with spaces.

We've since moved the default pipx install location on mac to a path without spaces and print a warning whenever a user has installed pipx in a path with spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants