Gentoo Archives: gentoo-portage-dev

From: Amit Dor-Shifer <amitds@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] using python in installation scripts
Date: Sun, 19 Apr 2009 05:50:07
Message-Id: 49EABB8C.1010400@oversi.com
In Reply to: Re: [gentoo-portage-dev] using python in installation scripts by Alec Warner
1 Great. 10x!
2 Amit
3
4 Alec Warner wrote:
5 > On Thu, Apr 16, 2009 at 1:17 AM, Zac Medico <zmedico@g.o> wrote:
6 > Amit Dor-Shifer wrote:
7 > >>> I want to read/write an XML file while an ebuild executes. Since I'm
8 > >>> unaware of any XML support in bash, I'm thinking of using python: I'd
9 > >>> write some python code and bundle it somehow into the package, so that
10 > >>> is shall be usable from pkg_XXX scripts.
11 > >>>
12 > >>> I browsed the tree and couldn't find other ebuilds that use python
13 > (nor
14 > >>> perl, for that matter), so I'm doing a sanity check: is this a wrong
15 > >>> path to follow? Appreciate comments. 10x.
16 > >>> Amit
17 > You can use whatever you like as long as you declare it in your
18 > build-time dependencies (DEPEND). If you require that python be
19 > built with the xml USE flag then you should set EAPI="2" and
20 > DEPEND="dev-lang/python[xml]".
21 >
22 > > Slight caveat, you can do whatever you want as long as it isn't in
23 > > global scope. Putting a python script in FILESDIR or bundling it with
24 > > the package is standard procedure, I know a bunch of tcl stuff used to
25 > > use tcl to install itself and distutils.eclass for example runs
26 > > setup.py to install things, so its nothing new.
27 >
28 > > -A
29 >
30 > >
31 > >