From: eroen <eroen@falcon.eroen.eu>
To: gentoo-user@lists.gentoo.org
Cc: mavrinac@gmail.com
Subject: [gentoo-user] Re: EAPI 4-python
Date: Mon, 24 Feb 2014 18:51:47 +0100 [thread overview]
Message-ID: <20140224185147.1368cb0e@falcon.eroen.eu> (raw)
In-Reply-To: <530B6A24.7090409@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3812 bytes --]
On Mon, 24 Feb 2014 16:49:56 +0100, Fox <halfsocialfox@gmail.com> wrote:
> On 02/24/2014 04:32 PM, eroen wrote:
> > On Mon, 24 Feb 2014 14:30:29 +0100, Fox <halfsocialfox@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
prev parent reply other threads:[~2014-02-24 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 13:30 [gentoo-user] EAPI 4-python Fox
2014-02-24 15:32 ` [gentoo-user] " eroen
2014-02-24 15:49 ` Fox
2014-02-24 17:51 ` eroen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140224185147.1368cb0e@falcon.eroen.eu \
--to=eroen@falcon.eroen.eu \
--cc=gentoo-user@lists.gentoo.org \
--cc=mavrinac@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox