[mythtv-commits] Ticket #13505: Rewrite python shebangs during 'make install' step

MythTV noreply at mythtv.org
Mon Nov 11 19:38:53 UTC 2019

#13505: Rewrite python shebangs during 'make install' step
     Reporter:  rcrdnalor          |      Owner:  Raymond Wagner
         Type:  Patch - Feature    |     Status:  new
     Priority:  minor              |  Milestone:  needs_triage
    Component:  Bindings - Python  |    Version:  Master Head
     Severity:  medium             |   Keywords:  python shebang
Ticket locked:  0                  |
 This patch is a follow up to ticket #13504:
 Feature patch - clean up (dead) QMAKE_COPY_DIR code

 As outlined in #13504, we need to set the python shebangs
 according to the configured python version for each installation.

 Python's PEP 394 already defines the usage of shebangs in
 respect of the configured python version:

 On recent linux distributions, the shebang
 `#!/usr/bin/env python` may not exist anymore and
 package install scripts already warn about
 'ambiguous python shebang' during packaging.

 This patch rewrites the shebang of python scripts during the
 'make install' step of mythtv's 'metadata' scripts located in
 'mythtv/programs/scripts' according the given python version.
 It ignores scripts that are set intentionally to python2.

 It can be easily expanded to other folders like
 'hardwareprofile' or 'internetcontent'.

 Please note: This script looks like somehow 'quick and dirty',
 but i tried other solutions like creating an 'intermediate target'
 for the python scripts, and they are much more complicated than
 this one, albeit, I don't speak QMAKE well.

Ticket URL: <https://code.mythtv.org/trac/ticket/13505>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list