git-summary icon indicating copy to clipboard operation
git-summary copied to clipboard

Relative paths and the 'python' executable

Open khumba opened this issue 2 years ago • 1 comments

Hey,

Debian no longer provides an executable named python by default[1][2], so relative repo paths don't work out of the box. Is this something you'd want to handle? Some options could be:

  • If you want to keep the code as is, then Debian users can install the python-is-python3 package to create the python -> python3 symlink, but this is a manual step that they have to know about.
  • The code could check for the existence of either python3 or python2 executables (...or just python3 if py2 compatibility isn't a concern).
  • I see there is a realpath --relative-to= option, I'm not sure if it this is equivalent to Python's os.path.relpath() but maybe the dependency on Python isn't needed.

[1] https://wiki.debian.org/Python [2] https://www.debian.org/doc/packaging-manuals/python-policy/#unversioned-python-commands

khumba avatar Sep 09 '23 21:09 khumba

(Also --relative-to= seems to be a GNU thing, it doesn't look like it's present on Mac.)

khumba avatar Sep 09 '23 21:09 khumba