FS#30024 - [hplip] uses wrong python interpreter
Attached to Project:
Arch Linux
Opened by Thomas Schneider (BlackLotus) - Saturday, 26 May 2012, 10:18 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 02 June 2012, 21:08 GMT
Opened by Thomas Schneider (BlackLotus) - Saturday, 26 May 2012, 10:18 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 02 June 2012, 21:08 GMT
|
Details
Description:
hplip is a toolset to handle hp printers written in python2. Some tools of this suite aren't modified so they use python2. Additional info: hplip 3.12.4-1 Steps to reproduce: [micha@myhost ~]$ /usr/share/hplip/upgrade.py File "/usr/share/hplip/upgrade.py", line 117 except getopt.GetoptError, e: ^ SyntaxError: invalid syntax Steps to fix: sudo sed -i 's/python/env python2/' /usr/share/hplip/upgrade.py [micha@myhost ~]$ /usr/share/hplip/upgrade.py HP Linux Imaging and Printing System (ver. 3.12.4) HPLIP upgrade latest version ver. 1.0 Copyright (c) 2001-14 Hewlett-Packard Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. Latest version of HPLIP is already installed. [micha@myhost ~]$ PKGBUILD patch included. |
This task depends upon
Closed by Andreas Radke (AndyRTR)
Saturday, 02 June 2012, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in 3.12.4-4; I doubt we need to fix all python calls inside base/magic.py. That shouldn't harm funcionality.
Saturday, 02 June 2012, 21:08 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in 3.12.4-4; I doubt we need to fix all python calls inside base/magic.py. That shouldn't harm funcionality.
this is done on other package with this simple line:
find -name *.py -exec sed -i "s|/usr/bin/python|/usr/bin/python2|" {} \;
and/or
find -name *.py -exec sed -i "s|/usr/bin/env python|/usr/bin/env python2|" {} \;
you don't have to bother to create a sed line for each file
[0L, 'string', '=', '#!/usr/bin/python', 'application/x-python'],
this would be replaced, too, by the find-name ... sed command. not sure if this is intended.