• Jérome Perrin's avatar
    component/glib: put slapos python3 in PATH · 698f69d5
    Jérome Perrin authored
    On old debian (9) where python3 is python3.5 this component fails to
    build with an error like:
    
        Configuring gdbus-example-objectmanager-visibility.h with command
        Running command: /opt/slapgrid/shared/glib/60e920f1feec2451d51bb344cfcad9ab/.build/glib-2.76.3/tools/gen-visibility-macros.py 2.0 visibility-macros GDBUS_OBJECT_MANAGER_EXAMPLE /opt/slapgrid/shared/glib/60e920f1feec2451d51bb344cfcad9ab/.build/glib-2.76.3/builddir/gio/tests/gdbus-object-manager-example/gdbus-example-objectmanager-visibility.h
        --- stdout ---
        --- stderr ---
          File "/opt/slapgrid/shared/glib/60e920f1feec2451d51bb344cfcad9ab/.build/glib-2.76.3/tools/gen-visibility-macros.py", line 37
            """
            ^
        SyntaxError: invalid syntax
    
    This is because this gen-visibility-macros.py script is executable with
    a shebang:
    
        #!/bin/env python3
    
    for python 3 softwares, this is slapos python, because the python
    section from component/defaults.cfg injects the slapos' python in PATH,
    but for python 2 software, slapos' python 2 is injected in path and
    `python3` resolves to system python, which in that case fails because
    f-strings are SyntaxError but more generally this showed a dependency
    to system python, but we can not rely on system python here.
    698f69d5