Gentoo Archives: gentoo-portage-dev

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

Replies

Subject Author
Re: [gentoo-portage-dev] using python in installation scripts Nirbheek Chauhan <nirbheek.chauhan@×××××.com>
Re: [gentoo-portage-dev] using python in installation scripts Amit Dor-Shifer <amitds@××××××.com>