Page 1 of 1

0.7.x fails to start python scripts on ArchLinux

Posted: December 11th, 2011, 12:34 pm
by jinkstjb
Hi,
the following commit breaks starting python scrips on ArchLinux:

Code: Select all

commit c735e1da89035987261cc1ce6d058b4180a70dfd
Author: ShyPike <shypike@sabnzbd.org>
Date:   Fri Nov 4 22:21:36 2011 +0100

    Always run Python user scripts, despite not being "executable".
The problem is, that this commit prefixes "python" to every script ending in .py and at least on ArchLinux /usr/bin/python points to Python3 while the Python2 executable resides under /usr/bin/python2. Reverting the commit (obviously) fixes the issue.

Re: 0.7.x fails to start python scripts on ArchLinux

Posted: December 11th, 2011, 2:22 pm
by sander
FWIW: no problem with 07x git version on Ubuntu; on Ubuntu, 'python' points to python2. See below.

Code: Select all


sander@R540:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

sander@R540:~$ python3
Python 3.2 (r32:88445, Mar 25 2011, 19:56:22) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
sander@R540:~$


Re: 0.7.x fails to start python scripts on ArchLinux

Posted: December 11th, 2011, 2:36 pm
by shypike
Should be fixed now.
For scripts without the X-bit, the default Python will still be used.
Scripts with the X-bit, will be sent straight to the OS (like before).

Re: 0.7.x fails to start python scripts on ArchLinux

Posted: December 12th, 2011, 12:14 am
by jinkstjb
Should be fixed now.
Thanks! That solution looks like a great idea.
FWIW: no problem with 07x git version on Ubuntu; on Ubuntu, 'python' points to python2. See below.
Yeah, Arch is pretty much alone on this one for now. Being bleeding edge, the Arch devs made a judgment call to set Python 3 to be the default implementation sometime around the 3.1 release. It mostly works well and the provided distribution packages take this into account, but every now and then we get to annoy upstream devs with being different. ;)