1 |
Tiziano Müller wrote: |
2 |
>>> And then how do we deal with EAPI 3, where the syntax changes again? |
3 |
>> Portage (or whatever PM) reads the EAPI, determines it is 3, and goes |
4 |
>> from there. If you change the way you declare EAPI each time, yeah, |
5 |
>> that's a problem, but I'm not sure why that would ne necessary. |
6 |
> No, that is not the problem. |
7 |
> |
8 |
> Example: |
9 |
> In EAPI 42 we define that the package manager must provide a global function |
10 |
> extract_depend_from_setup_py() such that it is callable at a global level |
11 |
> in an ebuild like this |
12 |
> |
13 |
> *snip start* |
14 |
> |
15 |
> # Copyright 1999-2007 Gentoo Foundation |
16 |
> # Distributed under the terms of the GNU General Public License v2 |
17 |
> # $Header: $ |
18 |
> |
19 |
> EAPI=42 |
20 |
> |
21 |
> DESCRIPTION="A library aiming to support agile and test-driven python |
22 |
> development on various levels." |
23 |
> SRC_URI="http://codespeak.net/download/${PN}/${P}.tar.gz" |
24 |
> HOMEPAGE="http://codespeak.net/py/" |
25 |
> KEYWORDS="~amd64 ~x86" |
26 |
> SLOT="0" |
27 |
> LICENSE="MIT" |
28 |
> IUSE="" |
29 |
> |
30 |
> extract_depend_from_setup_py |
31 |
> |
32 |
> *snip end* |
33 |
> |
34 |
> Now, a package manager (or a tool) not knowing EAPI 42 will fail when it |
35 |
> tries to source the above ebuild to determine the EAPI version (as it is |
36 |
> being currently done as far as I understood it) because |
37 |
> extract_depend_from_setup_py is undefined. |
38 |
> So it won't even be able to read out the EAPI. |
39 |
> |
40 |
> With the EAPI in the filename tools now knowing EAPI-42 will either ignore |
41 |
> the above foo-1.0.ebuild-42 or mask it because they may identify the |
42 |
> EAPI-version without sourcing the ebuild. |
43 |
> |
44 |
> And: No, just sourcing the ebuild and simply masking it because we can't |
45 |
> source it is a no-go (since you're abusing error-handling as a case |
46 |
> switch). |
47 |
|
48 |
Agreed, and that's why I like the out-of-band solution better (i.e. |
49 |
header line with "# EAPI=42". No need for mangled filenames, and no |
50 |
nead to actually source. |
51 |
|
52 |
-Joe |
53 |
-- |
54 |
gentoo-dev@l.g.o mailing list |