Gentoo Archives: gentoo-dev

From: Krzysztof Pawlik <nelchael@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-python] New eclass for Python
Date: Wed, 29 Feb 2012 17:36:55
Message-Id: 4F4E61E1.2010008@gentoo.org
In Reply to: [gentoo-dev] Re: [gentoo-python] New eclass for Python by Mike Gilbert
1 On 29/02/12 06:13, Mike Gilbert wrote:
2 > On Tue, Feb 28, 2012 at 4:13 PM, Krzysztof Pawlik <nelchael@g.o> wrote:
3 >> Hello,
4 >>
5 >> After some work during weekend on Python packages I've decided to start a
6 >> rewrite of Python/distutils eclass for installing Python packages. My main goal
7 >> was simplicity and functionality similar to ruby-ng.eclass (thanks Ruby team for
8 >> your great work!). Python team members already contributed comments and
9 >> suggestions and helped me to make the eclass better, thank you!
10 >>
11 >> Highlights:
12 >> - *SIMPLE*next
13 >> - uses PYTHON_TARGETS use-expand (no more python-updater, whoooo!)
14 >> - EAPI4 required, uses REQUIRED_USE
15 >> - <400 lines of code including documentation
16 >> - should work for >95% of packages (my educated guess)
17 >> - did I mention it's *SIMPLE*?
18 >> - easy to maintain & read so it's also easy to use
19 >>
20 >> Important thing: I'm not aiming at having 100% functionality of current
21 >> python.eclass+distutils.eclass in the new one, I think that simplicity is more
22 >> important that supporting every possible, obscure case that's out there.
23 >>
24 >> I'm attaching the eclass itself and two ebuilds using it, code is also available
25 >> in my overlay at http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=summary
26 >>
27 >> If there are no objections then during the weekend (March 3, 4) I will add this
28 >> to portage (after finishing remaining TODO items, PyPy requires 4G of RAM(!!)).
29 >>
30 >> --
31 >> Krzysztof Pawlik <nelchael at gentoo.org> key id: 0xF6A80E46
32 >> desktop-misc, java, vim, kernel, python, apache...
33 >>
34 >
35 > # Phase function: src_unpack
36 > python-distutils-ng_src_unpack() {
37 > [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
38 >
39 > if type python_unpack &> /dev/null; then
40 > # This should not run anything specific to any single Python
41 > # implementation, keep it generic:
42 > python_unpack_all
43 > else
44 > [[ -n ${A} ]] && unpack ${A}
45 > fi
46 > }
47 >
48 > I think you meant to write "if type python_unpack_all".
49 >
50 > More to the point, I don't actually understand why this function
51 > exists. It doesn't actually do anything that default_src_unpack does
52 > not do already. Exporting it will clobber any vcs eclasses if the
53 > inherit order is wrong.
54
55 You're right, I've killed the python-distutils-ng_src_unpack() function.
56
57 --
58 Krzysztof Pawlik <nelchael at gentoo.org> key id: 0xF6A80E46
59 desktop-misc, java, vim, kernel, python, apache...

Attachments

File name MIME type
signature.asc application/pgp-signature