python setuptools entry_point scripts have wrong #! line when specified with a relative path

Bug #1597919 reported by Thomi Richards
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Kyle Fazzari

Bug Description

I'm snapping an app that uses a setuptools entry_point as the main command to run. Setuptools generates a script (called 'sofa') in this case, with a #! that points to the python distribution in the snapcraft parts directory.

In the snapcraft.yaml file, if I specify the command as 'sofa', the command wrapper script launches with the interpreter in the parts directory. If instead I specify the command in the snapcraft.yaml as 'usr/bin/sofa' then everything works as expected.

Changed in snapcraft:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.13
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: Triaged → In Progress
Changed in snapcraft:
milestone: 2.13 → 2.14
Changed in snapcraft:
milestone: 2.13 → 2.14
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

An attempt to rewrite shebangs instead of handling at the command level: https://github.com/snapcore/snapcraft/pull/680

Changed in snapcraft:
assignee: Sergio Schvezov (sergiusens) → Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.