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