Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 562328

Summary: dev-python/pyflakes: Should install executable for every python version
Product: Gentoo Linux Reporter: Priit Laes (IRC: plaes) <plaes>
Component: [OLD] UnspecifiedAssignee: Python Gentoo Team <python>
Status: RESOLVED CANTFIX    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Priit Laes (IRC: plaes) 2015-10-05 15:00:26 UTC
Currently pyflakes installs only single executable which seems to only use version based on system default python.

For example, when my default system python is 2.7, /usr/bin/pyflakes points to 2.7 versin and when trying to run against python3 only files, it shows errors for python3-specific behaviour.

It would be nice to have pyflakes-2.7, pyflakes-3.3 and etc binaries too.
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2015-10-09 08:07:20 UTC
something is very wrong there

 $ ls -ld  /mnt/gen2/TmpDir/portage/dev-python/pyflakes-0.9.2/image/usr/bin/pyflakes
lrwxrwxrwx 1 testuser testuser 31 Oct  9 16:05 /mnt/gen2/TmpDir/portage/dev-python/pyflakes-0.9.2/image/usr/bin/pyflakes -> ../lib/python-exec/python-exec2

which adapts to whichever system python.
Can someone replicate this?
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2015-10-10 14:55:55 UTC
(In reply to Ian Delaney from comment #1)
> something is very wrong there
> 

What exactly is wrong here?
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2015-10-10 15:04:33 UTC
(In reply to Priit Laes (IRC: plaes) from comment #0)
> Currently pyflakes installs only single executable which seems to only use
> version based on system default python.
> 
> For example, when my default system python is 2.7, /usr/bin/pyflakes points
> to 2.7 versin and when trying to run against python3 only files, it shows
> errors for python3-specific behaviour.
> 
> It would be nice to have pyflakes-2.7, pyflakes-3.3 and etc binaries too.

Sadly we cannot do this. This should be something upstream needs to implement, like

pyflakes --python3.4 foo-3.py

As a workaround you can do

alias pyflakes2="EPYTHON=python2.7 pyflakes"