← Back to issue list

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

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1597919
Type
issue
State
closed
Author
~thomir-deactivatedaccount
Labels
Created
Updated
Closed

Current evaluation

Abandoned. Closed without comments or resolution. Setuptools entry_point scripts continue generating incorrect shebang lines with relative paths in snapcraft. No fix or merge was implemented.

Suggested action:

No scores available.

Issue body

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.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Abandoned. Closed without comments or resolution. Setuptools entry_point scripts continue generating incorrect shebang lines with relative paths in snapcraft. No fix or merge was implemented.
qwen/qwen3.6-35b-a3b Closed without resolution or comments. Snapcraft generated incorrect shebang lines for relative setuptools entry points. A workaround using absolute paths was documented, indicating the report was likely abandoned.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1486680 snapcraft plugin for python2/3 should fix incorrect shebang on pkg_resources-generated scripts snapcraft (launchpad) closed Closed without resolution. The request to patch pkg_resources-generated shebangs from /usr/bin/python3 to /usr/bin/env python3 in the snapcraft plugin was abandoned.
71%