Bug 58223

Summary: Should specify /usr/bin/python2 instead of /usr/bin/python
Product: ITS Tool Reporter: Kerrick Staley <bugs>
Component: generalAssignee: Shaun McCance <shaunm>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium CC: marc.planolesay, nuno.araujo
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Update itstool shebang to force usage of python2
Fix for libxml2 discovery

Description Kerrick Staley 2012-12-13 06:09:39 UTC
The first line of itstool [1] is

#!/usr/bin/python -s

It should instead be

#!/usr/bin/python2 -s

to ensure compatibility with systems where "python" refers to Python 3. See [2].

[1] https://gitorious.org/itstool/itstool/blobs/master/itstool.in
[2] http://www.python.org/dev/peps/pep-0394/
Comment 1 Nuno Araujo (IRC: russo79) 2013-01-14 22:06:51 UTC
Created attachment 73025 [details] [review]
Update itstool shebang to force usage of python2
Comment 2 Marc Plano-Lesay 2013-07-31 12:05:10 UTC
I just had the issue on ArchLinux, which switched to Python 3 as default for a while.
Comment 3 Kerrick Staley 2013-12-28 18:34:46 UTC
After https://gitorious.org/itstool/itstool/commit/1cce05f8c3d2b52f030b3e253d37ae5a6eee8003 this is resolved; the user can run

PYTHON=/usr/bin/python2 ./configure ...

instead of

./configure ...
Comment 4 Richard Mark 2014-07-24 21:57:33 UTC
The check for libxml2 does not use the $PYTHON version discovered from AutoConf

I built a patch for this on gitorious under rickmarks-itstool that changes the check to use $PYTHON, works for me with a dual python 2 and 3 system correctly
Comment 5 Richard Mark 2014-07-24 22:02:39 UTC
Created attachment 103408 [details] [review]
Fix for libxml2 discovery

Here's a patch to fix the libxml2 discovery
Comment 6 Michael Catanzaro 2014-07-25 01:48:00 UTC
I think only Richard's patch is needed nowadays, and it's identical to my patch in bug #73491, so let's use that bug instead.

*** This bug has been marked as a duplicate of bug 73491 ***

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.