I have a Python-package that calls Inkscape as part of a conversion process. I have it installed, but through Flatpak. This means that calling inkscape does not work in the terminal, but rather flatpak run org.inkscape.Inkscape. I need the package to be able to call it as inkscape.

What is the best way to go about this?

  • adONis@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    11 months ago

    Why don’t you check for both and use the one that’s available, otherwise print an error. Additionally you could read an env INKSCAPE_BIN and also include that in your checks.

    So one could for example do INKSCAPE_BIN='distrobox enter arch -- inkscape' python main.py

    • cyberwolfieOP
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      It is not my package, but I could of course go ahead and change the source code directly to handle this. But I’d prefer a solution that would persist through updates.