Bug 72533

Summary: hardcoding #!/usr/bin/python is not portable
Product: ITS Tool Reporter: Allison Lortie (desrt) <desrt>
Component: generalAssignee: Shaun McCance <shaunm>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] Don't hardcode python path

Description Allison Lortie (desrt) 2013-12-09 18:11:43 UTC
Many systems have python in /usr/local/bin

Should probably change this to #!/usr/bin/env python2

Not sure what to do about the -s... (since shbangs take only 1 argument).
Comment 1 Allison Lortie (desrt) 2013-12-09 18:11:59 UTC
I suppose we could have a configure check and a substitution macro.  I'll try a patch.
Comment 2 Allison Lortie (desrt) 2013-12-09 18:22:34 UTC
Created attachment 90532 [details] [review]
[PATCH] Don't hardcode python path

Instead, use automake to find it at runtime and put #!@PYTHON@ at the top of
itstool.in.
Comment 3 Shaun McCance 2013-12-11 17:12:14 UTC
Pushed to master. Thanks.
Comment 4 Rafael Fontenelle 2014-03-13 14:12:32 UTC
The file 'configure.ac' calls 'python' binary, but Arch Linux has Python 2 binary named to 'python2'. This breaks the compilation. Would it be possible to use something more portable, like a $PYTHON variable?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.