Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99825 - making python packages available for all major versions of python
Summary: making python packages available for all major versions of python
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Lowest enhancement (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-21 12:42 UTC by Tobias Brox
Modified: 2010-08-23 11:33 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Brox 2005-07-21 12:42:12 UTC
(This bug was hard to name - and hard to search for.  Apologies if it is already
reported)

An "emerge world" gave me python2.4 in addition to python2.3.  This is as
expected.  Obviously, all python libraries will have to be re-emerged to get
them available in python2.4 (well, some of them can be "hacked" available by
adding /usr/python2.3/site-packages to the python search path).

My problem is that I use python2.3 for a particular project, and upgrading to
python2.4 is not planned to happen this week, at least.  But such a small thing
as a simple "emerge psycopg" efficiently unmerges the installed psycopg, making
it available only for python2.4 and not python2.3.

To get the package available for python2.3 again, I had to manually edit the
ebuild to specify --with-python-version=2.3 to the configure script.  But
(unsurprisingly), the 2.4-version got unmerged in the process.

I'm not well-enough into the python internals to see how this can be solved. 
Any hints would be appreciated.  Maybe it could be possible to tell the ebuild
to repeat the compile and install process for all python versions available at
the system?

Reproducible: Always
Steps to Reproduce:




$ emerge info
Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1.50GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.2.3-r1, 2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sfperms strict"
GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirror.pudas.net/gentoo
http://mirror.switch.ch/mirror/gentoo/ http://ftp.rhnet.is/pub/gentoo/
http://mir.zyrianes.net/gentoo/ http://ftp.du.se/pub/os/gentoo
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="x86 16bit 3ds 7zip X aac aalib acl acpi ada aim alsa amarok amd amr apache
apache2 arts asterisk async atlas audiofile authdaemond automount avi
bash-completion berkdb bidi bitmap-fonts bl blender-game bluetooth bmp boo
browserplugin buffysize buttons calendar cap caps cardbus cdda cddb cdf cdio
cdparanoia cdr cdrom cgi chroot clearcase clisp cln cpudetection crypt cscope
css csv ctype cups curl curlwrappers custom-cflags cvsgraph db2 dba dbase dbcp
dbm dbmaker dbx dga dhcp disk-cache distribution divx4linux doc dpms dv dvb dvd
dvdr dvdread dvi eds emacs emboss encode epson erandom escreen esd extras fam
ffmpeg flac foomaticdb fortran ftp gb gd gdbm geometry gg ggi gif gimp gimpprint
ginac glibc-compat20 glut gnome gphoto2 gpm gstreamer gtk gtk2 guile icq
imagemagick imap imlib ipv6 jack java jpeg junit kde libg++ libwww lirc m17n-lib
mad mail maildrop make-symlinks mapeditor maps math matroska mbox mcal mccp mcve
md5sum memlimit messages mew mhash mikmod milter mime mimencode ming mixer mjpeg
motif mozcalendar mozilla mp3 mp4live mpeg mpeg2 mpeg4 mplayer msn msnextras
multi-tty multicall multislot multitarget music mysql mythtv nagios-dns
nagios-game nagios-ntp nagios-ping nagios-ssh nas ncurses net netbeans netboot
nethack network new-login nfs nls nntp nptl nsplugin ntlm numeric nvidia objc
ocaml octave odbc offensive ogg oggvorbis openal opengl openntpd openssh openssl
oss pam pam_chroot pam_console pam_timestamp pango parse-clocks pascal passfile
password patented pbs pcmcia pcntl pcre pdf pdfkit pdflib perforce perl perlsuid
pfpro pg-hier pg-vacuumdelay php physfs player plotutils plugin png pnp posix
postfix postgres print priority procmail python qt quicktime quotas quotes
readline real reiserfs remix remote resperl rhino rogue rplay rrdtool rss rtc
ruby samba sasl scanner screen sdl sendmail sensord shaper simplexml slang sms
smtp speex spell sqlite sse ssl subject-rewrite subtitles subversion svga svgz
sysfs syslog sysvipc szip tcltk tcpd tetex text threads tiff truetype
truetype-fonts type1-fonts unicode vorbis xine xml xml2 xmms xv zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Heitzso 2005-10-11 05:17:25 UTC
A variation of this is a recent emerge -u world does
now pick up new python, but does not auto pick up psycopg
library.  I use python as cgi script and took awhile to
sift through and realize I needed to re-emerge psycopg.
But reemerge of psycopg fails because you first have
to reemerge egenix-mx-base for psycopg. 

Would have been nice, if at all possible, for the python
upgrade to auto pick up reemerge of secondary libs, and
in the correct sequence.
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2005-11-03 12:18:04 UTC
unfortunately, its is a limitation of the packaging system that we can't do this cleanly. the kernel modules 
side of things has a workable scheme, i believe. so it might be benefitial to look into that.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2005-11-23 09:53:15 UTC
Portage comment: You don't want the kernel module solution (it's a hardcoded
CONFIG_PROTECT extension in portage itself), it's not very nice from both
implementation and user POV.
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2005-12-02 02:23:57 UTC
thanks for the comment from genone. i'm going to keep this open, but its going to be something we will 
think aboiut further down the track. everyone should benefit from having the latest supported version of 
python running. 
Comment 5 r01 2007-10-09 19:29:52 UTC
this is Oct 2007 now, is there some new improvements now?

I have encountered a similar problem as this:
I use python2.4, and then installed a python2.5 SLOT, the python-updater could upgrade all my python modules to python2.5, but when I use zope and plone, it needs python2.4 and a specific python module, at this time this specific module is only available to my python2.5, I don't know how to make it available to python2.4 just by emerge and portage approach, I have to install the specific pymodule with 'python2.4 setup.py install' command, that sounds not good.
Comment 6 Michael Dubner 2008-06-14 22:24:57 UTC
It would be nice if we can have same package in different python versions simulateneusly. In current scheme we could try to rewrite SLOTS in python eclasses. So if package ebuild have no SLOTS it got them from python, if it have any it got slots for every pair of python-slot and package-slot. I.e. if package have (in different ebuilds of cause):
SLOT="2"
SLOT="3"
we create slots:
SLOT="2:2.3"
SLOT="2:2.4"
SLOT="2:2.5"
SLOT="3:2.3"
SLOT="3:2.4"
SLOT="3:2.5"

This scheme can also be useful for other plugin systems - i.e. xulrunner applications, firefox addons, postgresql package libraries and so on.

Any ideas how this can be done?
Comment 7 Ivan Havlicek 2008-11-13 13:44:08 UTC
Hi,

There's another way to do that :

# emerge app-admin/eselect-python

# eselect python list
Available python interpreters:
  [1]   python2.4
  [2]   python2.5 *

# eselect python set python2.4

# emerge dev-python/psycopg

==> Installation in : /usr/lib/python2.4/site-packages/psycopg2

maybe, this can help.
Best regards.