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

Bug 292282

Summary: dev-python/py installed for wrong Python version
Product: Gentoo Linux Reporter: David Ripton <dripton>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description David Ripton 2009-11-07 16:53:34 UTC
If there are multiple Python versions installed, dev-python/py sometimes installs its binaries pointing at the wrong one by default.

$ eselect python list
Available python interpreters:
  [1]   python2.6 *
  [2]   python3.1

$ emerge dev-python/py
...

$ head -1 /usr/bin/py.test
$ cat /usr/bin/py.test
#!/usr/bin/python3.1

$ head -1 /usr/bin/py.cleanup
#!/usr/bin/python3.1

$ emerge --info                 
Portage 2.1.7.4 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.11-r0, 2.6.31-gentoo-r4 i686)                                                                 
=================================================================                
System uname: Linux-2.6.31-gentoo-r4-i686-AMD_Processor_model_-with-gentoo-2.0.1 
Timestamp of tree: Sat, 07 Nov 2009 09:00:01 +0000                               
app-shells/bash:     4.0_p35                                                     
dev-java/java-config: 2.1.9-r1                                                   
dev-lang/python:     2.6.4, 3.1.1-r1                                             
dev-python/pycrypto: 2.1.0_beta1                                                 
dev-util/cmake:      2.6.4-r3                                                    
sys-apps/baselayout: 2.0.1                                                       
sys-apps/openrc:     0.5.2-r1                                                    
sys-apps/sandbox:    2.2                                                         
sys-devel/autoconf:  2.13, 2.63-r1                                               
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11                       
sys-devel/binutils:  2.20                                                        
sys-devel/gcc-config: 1.4.1                                                      
sys-devel/libtool:   2.2.6a                                                      
virtual/os-headers:  2.6.30-r1                                                   
ACCEPT_KEYWORDS="x86 ~x86"                                                       
CBUILD="i686-pc-linux-gnu"                                                       
CFLAGS="-march=barcelona -O3 -pipe -fomit-frame-pointer -combine"                
CHOST="i686-pc-linux-gnu"                                                        
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind /var/lib/hsqldb"             
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                        
CXXFLAGS="-march=barcelona -O3 -pipe -fomit-frame-pointer -combine"              
DISTDIR="/usr/portage/distfiles"                                                 
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv"          
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://128.213.5.34/gentoo/ http://mirror.datapipe.net/gentoo"                                                                    
LANG="C"                                                                         
LDFLAGS="-Wl,-O1"                                                                
MAKEOPTS="-j8"                                                                   
PKGDIR="/usr/portage/packages"                                                   
PORTAGE_CONFIGROOT="/"                                                           
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                     
PORTAGE_TMPDIR="/var/tmp"                                                        
PORTDIR="/usr/portage"                                                           
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa apache2 avahi bash-completion branding bzip2 cairo cdr cli consolekit cracklib crypt cups d dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal iconv imap ipv6 java jpeg junit kde kde4 ldap libnotify mad maildir mikmod mmx modules mozdevelop mozilla mozsvg mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg oggvorbis opengl openmp oss pam pcre pdf perl png ppds pppd python qt qt3support qt4 quicktime readline reflection sdl session spell spl sse ssl startup-notification svg sysfs tcpd theora thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xinerama xml xmms xorg xulrunner xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-07 20:31:14 UTC
It's expected behavior.
Comment 2 David Ripton 2009-11-08 14:39:14 UTC
That's very sad.  It means that all the work that's gone into supporting multiple Python versions in parallel is pretty much useless.

Removing Gentoo's Python 3.1; installing 3.1 from source in /usr/local again.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-08 14:43:40 UTC
(In reply to comment #2)
> That's very sad.  It means that all the work that's gone into supporting
> multiple Python versions in parallel is pretty much useless.

It's for Python modules. It doesn't necessarily affect Python scripts. There is usually no need to install scripts for multiple Python versions.