Skip to content

Clippy Python scripts portablility #2882

Closed
@mati865

Description

@mati865

Currently all Python scripts in this repository use shebang #!/usr/bin/env python.

The problem

This is bad because python means default system Python which is Python 3 for Arch and scripts don't work.
Other distributions are going to follow it sooner or later because Python 2 won't be maintained since 2020, for an example: Fedora proposal. Also many distributions like Ubuntu, OpenSUSE, Fedora want to ship only with Python 3 preinstalled.

Behaviour on different platforms

I've checked many Linux distributions and all of them had python2, python2.7, python3, python3.X (X differs based on the version).
All I know about OSX is it doesn't have python2 but has python2.7, it would be great if somebody could reply with list of all variants.
MSYS2 (aka windows-gnu) does it just like Linux, no idea about windows-msvc (does #!/usr/bin/env even work there?).

Possible solutions

  1. Use #!/usr/bin/env python2; probably would work everywhere (sometimes it's not installed but available in repo) but note that, Python 2 is almost dead already.
  2. Port scrips to Python 3; I have no idea about OSX and MSVC, should work everywhere else.
  3. RIIR; everything will work on every supported platform, it's win-win but takes more effort.

cc no idea

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions