From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LuhO8-0000JJ-Se for garchives@archives.gentoo.org; Fri, 17 Apr 2009 06:17:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 20138E076A; Fri, 17 Apr 2009 06:17:24 +0000 (UTC) Received: from mail-gx0-f224.google.com (mail-gx0-f224.google.com [209.85.217.224]) by pigeon.gentoo.org (Postfix) with ESMTP id 04F95E076A for ; Fri, 17 Apr 2009 06:17:23 +0000 (UTC) Received: by gxk24 with SMTP id 24so1600354gxk.10 for ; Thu, 16 Apr 2009 23:17:23 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Sender: antarus@scriptkitty.com Received: by 10.231.36.75 with SMTP id s11mr2213429ibd.12.1239949043430; Thu, 16 Apr 2009 23:17:23 -0700 (PDT) In-Reply-To: <49E6E982.4060306@gentoo.org> References: <49E6E460.4070804@oversi.com> <49E6E982.4060306@gentoo.org> Date: Thu, 16 Apr 2009 23:17:23 -0700 X-Google-Sender-Auth: cba75761dc546017 Message-ID: Subject: Re: [gentoo-portage-dev] using python in installation scripts From: Alec Warner To: gentoo-portage-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: cf88df1d-c36b-419d-bc11-55c13d365eae X-Archives-Hash: c0eceac992b0a86e5b0e070d5be3d81e On Thu, Apr 16, 2009 at 1:17 AM, Zac Medico wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Amit Dor-Shifer wrote: >> I want to read/write an XML file while an ebuild executes. Since I'm >> unaware of any XML support in bash, I'm thinking of using python: I'd >> write some python code and bundle it somehow into the package, so that >> is shall be usable from pkg_XXX scripts. >> >> I browsed the tree and couldn't find other ebuilds that use python (nor >> perl, for that matter), =C2=A0so I'm doing a sanity check: is this a wro= ng >> path to follow? Appreciate comments. 10x. >> Amit > > You can use whatever you like as long as you declare it in your > build-time dependencies (DEPEND). If you require that python be > built with the xml USE flag then you should set EAPI=3D"2" and > DEPEND=3D"dev-lang/python[xml]". Slight caveat, you can do whatever you want as long as it isn't in global scope. Putting a python script in FILESDIR or bundling it with the package is standard procedure, I know a bunch of tcl stuff used to use tcl to install itself and distutils.eclass for example runs setup.py to install things, so its nothing new. -A > - -- > Thanks, > Zac > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.11 (GNU/Linux) > > iEYEARECAAYFAknm6YAACgkQ/ejvha5XGaM8SwCffZqf1k/jo0R5drk9IN0zwM6o > p0YAn0x0bAGJEe6fNwVJ/pSgRLVSCdrS > =3DZ5Nu > -----END PGP SIGNATURE----- > >