Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374579 - dev-lang/python-2.7.2: module DLFCN is missing
Summary: dev-lang/python-2.7.2: module DLFCN is missing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue12571
Whiteboard:
Keywords:
: 337583 376083 376221 377161 382585 (view as bug list)
Depends on: 375257
Blocks:
  Show dependency tree
 
Reported: 2011-07-09 18:44 UTC by Jure Repinc
Modified: 2011-10-16 10:50 UTC (History)
16 users (show)

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


Attachments
python-2.7.2-r1.ebuild patch for Linux-3 compatibility (python-2.7.2-r1.patch,1010 bytes, patch)
2011-07-24 09:22 UTC, Daniel Salas
Details | Diff
python-3.2-r1.ebuild Linux-3 compatibility (python-3.2-r1.patch,1.04 KB, patch)
2011-07-24 09:23 UTC, Daniel Salas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2011-07-09 18:44:44 UTC
I have just tried to use some KDE plasmoid that uses python and it didn't work. After looking at some logs it appears it doesn't work because it imports the DLFCN package, but it appears that it doesn't exist in version 2.7.2. It does in 3.2.

Reproducible: Always

Steps to Reproduce:
1. With Python 2.7.2 try to "import DLFCN"
Actual Results:  
You get error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named DLFCN

Expected Results:  
The module should exist and be installed
Comment 1 Pacho Ramos gentoo-dev 2011-07-10 17:50:35 UTC
Please provide "emerge --info" output
Comment 2 Jure Repinc 2011-07-10 18:07:01 UTC
$ emerge --info
Portage 2.1.10.4 (default/linux/amd64/10.0/no-multilib, gcc-4.6.1, glibc-2.14-r0, 3.0.0-rc6-00188-gf1a04db-dirty x86_64)
=================================================================
System uname: Linux-3.0.0-rc6-00188-gf1a04db-dirty-x86_64-Intel-R-_Core-TM-_i5-2500K_CPU_@_3.30GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 09 Jul 2011 22:00:01 +0000
ccache version 3.1.5 [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2, 3.2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.6.1
sys-devel/gcc-config:     1.5-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.14
Repositories: gentoo x11 thousand-parsec x-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -pipe -O2 -floop-interchange -floop-strip-mine -floop-block -fgcse-sm -fgcse-las -fgcse-after-reload"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/cursors/xorg-x11/default /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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"
CXXFLAGS="-march=corei7-avx -pipe -O2 -floop-interchange -floop-strip-mine -floop-block -fgcse-sm -fgcse-las -fgcse-after-reload"                                                                                                                                              
DISTDIR="/usr/portage/distfiles"                                                                                                                                                                                                                                               
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"                                                           
FFLAGS=""                                                                                                                                                                                                                                                                      
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://distfiles.gentoo.org/"                                                                                                                                       
LANG="sl_SI.utf8"                                                                                                                                                                                                                                                              
LC_ALL="sl_SI.utf8"                                                                                                                                                                                                                                                            
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                                                                                                                                                              
LINGUAS="sl en"                                                                                                                                                                                                                                                                
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="/var/lib/layman/x11 /var/lib/layman/thousand-parsec /usr/local/portage/overlay"                                                                                                                                                                               
SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                                                                                                                                                                                                 
USE="X a52 aac acl acpi aes-ni-aim alsa amd64 apache2 audiofile avi avx berkdb bzip2 cairo cdr cli consolekit cracklib crypt cups curl cxx dbus dri dts dvd dvdr dvdread encode esd exif fam fbcon ffmpeg fftw flac foomaticdb freetype ftp gdbm geoip gif gmp gnome gphoto2 gpm gstreamer gtk gtk2 iconv icu idn imagemagick inotify ipv6 jabber jpeg kde kdehiddenvisibility lcms lm_sensors mad matroska mmx mng modules mozilla mp3 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl php plasma png posix ppds pppd python qt3 qt3support qt4 quicktime readline samba scanner sdl semantic-desktop session slp speex spell sqlite sse sse2 sse3 sse4 ssl ssse3 stream subversion svg sysfs tcpd tetex theora tiff truetype unicode usb vhosts videos vorbis xcb xcomposite xine xml xml2 xmms xorg xosd xprint xscreensaver 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sl en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="r600 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"                                                                          
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Rafał Mużyło 2011-07-12 19:04:34 UTC
It seems the problem lies in kernel version - 3.x without a patch to configure.in seems a no-go.
Comment 4 Nicolas Schlumberger 2011-07-14 19:18:46 UTC
I just confirmed it on python:2.7 and python:3.2.
Any version built against linux-3.0 (as runnign kernel) is missing DLFCN.

rebooting to 2.6.x kernel (tested with 2.6.39-hardened5), the rebuilding python makes DFLCN reappear. 

nico
Comment 5 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-07-15 07:36:34 UTC
I've filed http://bugs.python.org/issue12571 against upstream.
Comment 6 Jesus Rivero (RETIRED) gentoo-dev 2011-07-18 15:04:51 UTC
The module DLFCN.py is in a directory called plat-linux2 in ${prefix}usr/$(get_libdir)/$(PYTHON_ABI)

When the kernel is linux 3, Python search for plat-linux3 instead of plat-linux2, so the module DLFCN is reported as not found. 

For those of you having this issue, you could try to create a symbolic link from plat-linux2 to plat-linux3, but that doesn't mean you are going to stop having issues.

We have to wait for upstream to make a decision on how to handle this particular issue.
Comment 7 Rafał Mużyło 2011-07-18 16:50:27 UTC
I'd say http://bugs.python.org/issue12326#msg140061 would be the most simple solution (at least for the time being), even if the one of the later comments there disagrees - after all, 3.0 bump is just a cosmetic thing, not anything more.
Comment 8 Jesus Rivero (RETIRED) gentoo-dev 2011-07-18 16:59:46 UTC
(In reply to comment #7)
> I'd say http://bugs.python.org/issue12326#msg140061 would be the most simple
> solution (at least for the time being), even if the one of the later comments
> there disagrees - after all, 3.0 bump is just a cosmetic thing, not anything
> more.

Could be. Thing is that this would make us to add a patch to Python patchset for a work-around that, as I stated before, would still allow some code to break, and is not agreed up on upstream. If upstream decides to go with the "only linux" platform name, then we'll have to eliminate this patch from the patchset, making it painful for everybody.
Comment 9 Sander Sweers 2011-07-22 20:27:55 UTC
Proposed fix per upstream issue 12571. Confirmed working for python-2.7.2.

--- /usr/portage/dev-lang/python/python-2.7.2.ebuild	2011-06-27 11:31:08.000000000 +0200
+++ /usr/local/mine/dev-lang/python/python-2.7.2.ebuild	2011-07-22 22:18:16.099080559 +0200
@@ -137,6 +137,11 @@
 
 	EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" epatch "${patchset_dir}"
 
+	#fix linux-3 compat
+	mkdir Lib/plat-linux3 || die
+	for f in `ls Lib/plat-linux2/`;do
+		cp "Lib/plat-linux2/${f}" Lib/plat-linux3/;done || die
+
 	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
 		Lib/distutils/command/install.py \
 		Lib/distutils/sysconfig.py \
Comment 10 Jesus Rivero (RETIRED) gentoo-dev 2011-07-23 00:57:08 UTC
Fixed in CVS

dev-lang/python-2.6.7-r1
dev-lang/python-2.7.2-r1
dev-lang/python-3.1.4-r1
dev-lang/python-3.2-r1

This solution will be temporal, until upstream figure out the final way to do this.

Best regards,
Comment 11 Sander Sweers 2011-07-23 10:35:14 UTC
(In reply to comment #10)
> Fixed in CVS
> 
> dev-lang/python-2.6.7-r1
> dev-lang/python-2.7.2-r1
> dev-lang/python-3.1.4-r1
> dev-lang/python-3.2-r1
> 
> This solution will be temporal, until upstream figure out the final way to do
> this.

This fails.. Why not do this in src_prepare? It will only install 1 in the end.

PYTHONPATH=/var/portmp/portage/dev-lang/python-3.2-r1/image//usr/lib64/python3.2 LD_LIBRARY_PATH=/var/portmp/portage/dev-lang/python-3.2-r1/work/Python-3.2: \
	./python -Wi -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
cp: cannot stat `/var/portmp/portage/dev-lang/python-3.2-r1/image//usr/lib64/python3.2/plat-linux2': No such file or directory


PYTHONPATH=/var/portmp/portage/dev-lang/python-2.7.2-r1/image//usr/lib64/python2.7 LD_LIBRARY_PATH=/var/portmp/portage/dev-lang/python-2.7.2-r1/work/Python-2.7.2: \
	./python -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
cp: cannot stat `/var/portmp/portage/dev-lang/python-2.7.2-r1/image//usr/lib64/python2.7/plat-linux2': No such file or directory

new proposed fix.

--- /usr/portage/dev-lang/python/python-2.7.2-r1.ebuild	2011-07-23 02:53:21.000000000 +0200
+++ /usr/local/mine/dev-lang/python/python-2.7.2-r1.ebuild	2011-07-23 12:29:19.605032389 +0200
@@ -148,6 +148,9 @@
 		Modules/getpath.c \
 		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
 
+	#Linux-3 compat. Bug #374579 (upstream issue12571)
+	cp -r ${S}/Lib/plat-linux2 ${S}/Lib/plat-linux3 || die "copy plat-linux failed"
+
 	eautoreconf
 }
 
@@ -324,10 +327,6 @@
 	newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
 	newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
 
-	#Linux-3 compat. Bug #374579 (upstream issue12571)
-	cp -r "${ED}$(python_get_libdir)/plat-linux2" \
-			"${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed"
-
 	sed \
 		-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
 		-e "s:@PYDOC@:pydoc${SLOT}:" \
Comment 12 Bernhard Seibold 2011-07-23 10:57:48 UTC
I can confirm that the original fix fails, and that the proposed new fix works.
Comment 13 Sander Sweers 2011-07-23 12:12:07 UTC
(In reply to comment #11)
> This fails.. Why not do this in src_prepare? It will only install 1 in the end.

Ok, the fix needs to be in 2 places. 
1. has to be in src_prepare so the "missing" modules get installed again.
2. needs to copy plat-linux2 <> plat-linux3 so users can run both linux kernel version 2.x and 3.x.

Below should do the trick. Please can someone re-open this bug please?

--- /usr/portage/dev-lang/python/python-2.7.2-r1.ebuild	2011-07-23 02:53:21.000000000 +0200
+++ /usr/local/mine/dev-lang/python/python-2.7.2-r1.ebuild	2011-07-23 14:08:47.739136335 +0200
@@ -148,6 +148,8 @@
 		Modules/getpath.c \
 		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
 
+	#Linux-3 compat. Bug #374579 (upstream issue12571)
+	cp -r ${S}/Lib/plat-linux2 ${S}/Lib/plat-linux3 || die "copy plat-linux failed"
 	eautoreconf
 }
 
@@ -325,8 +327,13 @@
 	newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
 
 	#Linux-3 compat. Bug #374579 (upstream issue12571)
-	cp -r "${ED}$(python_get_libdir)/plat-linux2" \
+	if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then
+		cp -r "${ED}$(python_get_libdir)/plat-linux2" \
 			"${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed"
+	else
+		cp -r "${ED}$(python_get_libdir)/plat-linux3" \
+			"${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed"
+	fi
 
 	sed \
 		-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
Comment 14 Jesus Rivero (RETIRED) gentoo-dev 2011-07-23 14:14:43 UTC
Reopening. I'm working on this again
Comment 15 Helmut Jarausch 2011-07-23 17:40:10 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > This fails.. Why not do this in src_prepare? It will only install 1 in the end.
> 
> Ok, the fix needs to be in 2 places. 

Many thanks, that solved the problem for python-2.7.2-r1 and python-3.2-r1

(here on amd64, kernel 3.0)

Helmut.
Comment 16 Nikos Chantziaras 2011-07-23 19:02:40 UTC
I just got a rev-bump: python-2.6.7-r1 and it failed with:

cp: cannot stat `/var/tmp/portage/dev-lang/python-2.6.7-r1/image//usr/lib64/python2.6/plat-linux2': No such file or directory
Comment 17 yermandu 2011-07-23 21:16:08 UTC
same here the problem happens at install phase
 * ERROR: dev-lang/python-2.7.2-r1 failed (install phase):
 *   copy plat-linux failed
Comment 18 Ron 2011-07-24 07:00:57 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Fixed in CVS
> > 
> > dev-lang/python-2.6.7-r1
> > dev-lang/python-2.7.2-r1
> > dev-lang/python-3.1.4-r1
> > dev-lang/python-3.2-r1
> > 
> > This solution will be temporal, until upstream figure out the final way to do
> > this.
> 
> This fails.. Why not do this in src_prepare? It will only install 1 in the end.
> 
> PYTHONPATH=/var/portmp/portage/dev-lang/python-3.2-r1/image//usr/lib64/python3.2
> LD_LIBRARY_PATH=/var/portmp/portage/dev-lang/python-3.2-r1/work/Python-3.2: \
>     ./python -Wi -c "import lib2to3.pygram,
> lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
> cp: cannot stat
> `/var/portmp/portage/dev-lang/python-3.2-r1/image//usr/lib64/python3.2/plat-linux2':
> No such file or directory
> 
> 
> PYTHONPATH=/var/portmp/portage/dev-lang/python-2.7.2-r1/image//usr/lib64/python2.7
> LD_LIBRARY_PATH=/var/portmp/portage/dev-lang/python-2.7.2-r1/work/Python-2.7.2:
> \
>     ./python -Wi -t -c "import lib2to3.pygram,
> lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
> cp: cannot stat
> `/var/portmp/portage/dev-lang/python-2.7.2-r1/image//usr/lib64/python2.7/plat-linux2':
> No such file or directory
> 
> new proposed fix.
> 
> --- /usr/portage/dev-lang/python/python-2.7.2-r1.ebuild    2011-07-23
> 02:53:21.000000000 +0200
> +++ /usr/local/mine/dev-lang/python/python-2.7.2-r1.ebuild    2011-07-23
> 12:29:19.605032389 +0200
> @@ -148,6 +148,9 @@
>          Modules/getpath.c \
>          setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
> 
> +    #Linux-3 compat. Bug #374579 (upstream issue12571)
> +    cp -r ${S}/Lib/plat-linux2 ${S}/Lib/plat-linux3 || die "copy plat-linux
> failed"
> +
>      eautoreconf
>  }
> 
> @@ -324,10 +327,6 @@
>      newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
>      newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
> 
> -    #Linux-3 compat. Bug #374579 (upstream issue12571)
> -    cp -r "${ED}$(python_get_libdir)/plat-linux2" \
> -            "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux
> failed"
> -
>      sed \
>          -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
>          -e "s:@PYDOC@:pydoc${SLOT}:" \

This worked for me thanks for the fix :)
Comment 19 Ron 2011-07-24 07:02:56 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > This fails.. Why not do this in src_prepare? It will only install 1 in the end.
> 
> Ok, the fix needs to be in 2 places. 
> 1. has to be in src_prepare so the "missing" modules get installed again.
> 2. needs to copy plat-linux2 <> plat-linux3 so users can run both linux kernel
> version 2.x and 3.x.
> 
> Below should do the trick. Please can someone re-open this bug please?
> 
> --- /usr/portage/dev-lang/python/python-2.7.2-r1.ebuild    2011-07-23
> 02:53:21.000000000 +0200
> +++ /usr/local/mine/dev-lang/python/python-2.7.2-r1.ebuild    2011-07-23
> 14:08:47.739136335 +0200
> @@ -148,6 +148,8 @@
>          Modules/getpath.c \
>          setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
> 
> +    #Linux-3 compat. Bug #374579 (upstream issue12571)
> +    cp -r ${S}/Lib/plat-linux2 ${S}/Lib/plat-linux3 || die "copy plat-linux
> failed"
>      eautoreconf
>  }
> 
> @@ -325,8 +327,13 @@
>      newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
> 
>      #Linux-3 compat. Bug #374579 (upstream issue12571)
> -    cp -r "${ED}$(python_get_libdir)/plat-linux2" \
> +    if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then
> +        cp -r "${ED}$(python_get_libdir)/plat-linux2" \
>              "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux
> failed"
> +    else
> +        cp -r "${ED}$(python_get_libdir)/plat-linux3" \
> +            "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux
> failed"
> +    fi
> 
>      sed \
>          -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \

Whoops! meant this one worked for me thanks =P
Comment 20 Brett Boston 2011-07-24 07:51:44 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > This fails.. Why not do this in src_prepare? It will only install 1 in the end.

I can confirm that this fix works.
Comment 21 Daniel Salas 2011-07-24 09:22:15 UTC
Created attachment 280803 [details, diff]
python-2.7.2-r1.ebuild patch for Linux-3 compatibility
Comment 22 Daniel Salas 2011-07-24 09:23:19 UTC
Created attachment 280805 [details, diff]
python-3.2-r1.ebuild Linux-3 compatibility

Added both patches for ebuilds based on comment #13.
Comment 23 tman 2011-07-24 13:56:15 UTC
it would be nice if sb can add this to tree as soon as possible

thanks
Comment 24 Rafał Mużyło 2011-07-24 14:50:55 UTC
*** Bug 376221 has been marked as a duplicate of this bug. ***
Comment 25 Jesus Rivero (RETIRED) gentoo-dev 2011-07-24 15:10:02 UTC
-r2 versions in tree. 
I don't think we need both plat-linux2 and plat-linux3 installed at the same time. We just need the one with the kernel version you compiled it with. 

But as this should be a temp fix, and for the sake of not converting this into a revbump fest, let's leave it like this for the moment.

Best regards,
Comment 26 Jesus Rivero (RETIRED) gentoo-dev 2011-07-24 15:11:58 UTC
*** Bug 376083 has been marked as a duplicate of this bug. ***
Comment 27 Nikos Chantziaras 2011-07-24 15:20:32 UTC
(In reply to comment #25)
> -r2 versions in tree. 
> I don't think we need both plat-linux2 and plat-linux3 installed at the same
> time. We just need the one with the kernel version you compiled it with. 
> 
> But as this should be a temp fix, and for the sake of not converting this into
> a revbump fest, let's leave it like this for the moment.

There's no need to revbump when something doesn't build. And the problem with this was that it doesn't build :-)
Comment 28 Naohiro Aota gentoo-dev 2011-07-31 14:01:32 UTC
*** Bug 377161 has been marked as a duplicate of this bug. ***
Comment 29 Naohiro Aota gentoo-dev 2011-07-31 14:07:03 UTC
(In reply to comment #25)
> -r2 versions in tree. 
> I don't think we need both plat-linux2 and plat-linux3 installed at the same
> time. We just need the one with the kernel version you compiled it with. 
> 
> But as this should be a temp fix, and for the sake of not converting this into
> a revbump fest, let's leave it like this for the moment.

This fix make install phase to fail on BSD with:

cp -r "${ED}$(python_get_libdir)/plat-linux3" "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed";"

There are no such file on BSD. Please check if the system is Linux.
Comment 30 Richard Cox 2011-07-31 17:13:10 UTC
(In reply to comment #25)
> -r2 versions in tree. 
> I don't think we need both plat-linux2 and plat-linux3 installed at the same
> time. We just need the one with the kernel version you compiled it with. 
> 
> But as this should be a temp fix, and for the sake of not converting this into
> a revbump fest, let's leave it like this for the moment.
> 
> Best regards,

Some people have multi-boot environments are booting between different kernel versions.  I still have 2.6 and 3.0 and probably will for some time.
Comment 31 Naohiro Aota gentoo-dev 2011-08-05 11:42:55 UTC
I've moved the "copy plat-linux" line into if use kernel_linux .. fi.
Comment 32 Dmitri Bogomolov 2011-08-06 15:18:48 UTC
(In reply to comment #31)
> I've moved the "copy plat-linux" line into if use kernel_linux .. fi.

It seems you forgot `src_install()'. In =dev-lang/python-2.6.7-r2 i see

if use kernel_linux; then
                cp -r "${S}/Lib/plat-linux2" "${S}/Lib/plat-linux3" || die "copy plat-linux failed"
        fi

in `src_prepare()', but there is also

if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then
                cp -r "${ED}$(python_get_libdir)/plat-linux2" \
                        "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed"
        else
                cp -r "${ED}$(python_get_libdir)/plat-linux3" \
                        "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed"
        fi

in `src_install()' (bug 377161)
Comment 33 Naohiro Aota gentoo-dev 2011-08-07 10:02:07 UTC
(In reply to comment #32)
> (In reply to comment #31)
> > I've moved the "copy plat-linux" line into if use kernel_linux .. fi.
> 
> It seems you forgot `src_install()'. 

done.
Comment 34 Jesus Rivero (RETIRED) gentoo-dev 2011-08-23 15:09:45 UTC
This should be closed.
Comment 35 Jesus Rivero (RETIRED) gentoo-dev 2011-08-23 15:11:52 UTC
*** Bug 376083 has been marked as a duplicate of this bug. ***
Comment 36 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-09-08 13:25:21 UTC
*** Bug 337583 has been marked as a duplicate of this bug. ***
Comment 37 Andreas K. Hüttel archtester gentoo-dev 2011-10-16 10:50:59 UTC
*** Bug 382585 has been marked as a duplicate of this bug. ***