On Mon, 24 Feb 2014 16:49:56 +0100, Fox <halfsocial...@gmail.com> wrote: > On 02/24/2014 04:32 PM, eroen wrote: > > On Mon, 24 Feb 2014 14:30:29 +0100, Fox <halfsocial...@gmail.com> > > wrote: > >> Hello, > >> I am trying to install an ebuild that used EAPI=4-python getting > >> the error: > >> > >> API of python.eclass in EAPI="4-python" not established > >> > >> I googled the problem but there is not much to read (or at least I > >> could not find much) and what is there is old. So I wonder what is > >> the problem with this and if there is a way to use it as there are > >> many ebiulds (maybe only in overlays, I am not sure) that use it. > >> > >> Quim > >> > >> > > Afaik the *-python eapis are almost exclusively used by Arfrever's > > Progress overlay (and, by extension, funtoo). The error message you > > show seems to be from python.eclass in the main gentoo tree, which > > does not take un-official eapis into account. The code in question > > for reference (lines 30-32): > > > > if ! has "${EAPI:-0}" 0 1 2 3 4 5; then > > die "API of python.eclass in EAPI=\"${EAPI}\" not > > established" fi > > > > You might be able to use the ebuild stand-alone by also copying the > > relevant eclasses from whereever you got the ebuild into your local > > overlay (where I presume you put the ebuild?). However, from > > previous experience with the Progress overlay, you might want to > > use the entire overlay though layman in stead. Due to unfortunately > > incompatible python-implementation dependencies with gentoo proper > > it's rather an all-or-nothing deal. > > > The ebuild is from the ezod overlay. I am trying to use the ROS > related packages like wstool, rosdep. etc. They all seem to use this > EAPI. I thought that using this overlay would be easier than using > pip but apparently it's not is it? >
Installing python packages though pip (without using virtualenv or such) is not generally a great idea on gentoo, in particular many not-quite-standard packages seem to get confused by gentoo's python-exec and overwrite it, or automagically pull in some other dependency (typically setuptools) which is already installed, and clobber files that have been especially patched for gentoo with non-working vanilla versions. Looking at [1], it appears the overlay maintainer just recently (last 4 commits) moved to use the 4-python eapi. From having made this mistake myself in the past, I would guess he added the eclasses to his overlay locally and forgot to add them to git. Alternatively, an updated layout.conf might not have been commited. You could try creating an eclass/ folder in the overlay and put distutils.eclass and python.eclass from the Progress overlay[2] in there. I notice that the ebuilds in question seem to be quite cookie-cutter (as python ebuilds generally are, bless them!). Functionally migrating them to the gentoo python eclasses should not be a large job. Change `EAPI=4-python` to `EAPI=5`, change `inherit distutils` to `inherit distutils-r1`, add a line `PYTHON_COMPAT=( python2_7 python3_3 )` (or as appropriate). Slightly more involved (but not strictly necessary to make it work locally) is to fix up the dependencies. In particular, python library dependencies should specify the required python implementation, like so: DEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]" See the wiki[3] for more information on python ebuilds :-) I CC the ezod overlay maintainer on this email to inform about the issue and facilitate a proper fix, either in documentation form or overlay code. 1: http://git.overlays.gentoo.org/gitweb/?p=user/ezod.git 2: http://code.google.com/p/gentoo-progress/ 3: https://wiki.gentoo.org/wiki/Project:Python/distutils-r1 -- eroen
signature.asc
Description: PGP signature