Gentoo Archives: gentoo-dev

From: Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>
To: Gentoo Development <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] The Python problem
Date: Wed, 29 Jun 2011 12:45:08
Message-Id: 201106291443.59954.Arfrever@gentoo.org
In Reply to: Re: [gentoo-dev] The Python problem by Thomas Sachau
2011-06-27 22:57:05 Thomas Sachau napisaƂ(a):
> Dirkjan Ochtman wrote: > > On Mon, Jun 27, 2011 at 15:08, Fabian Groffen <grobian@g.o> wrote: > >> On 27-06-2011 14:28:34 +0200, Dirkjan Ochtman wrote: > >> It would be nice when a similar technique could be implemented only > >> once, in a consistent way. In a way, multilib-portage can be considered > >> equal to one of the objectives of the python (and ruby) eclass: > >> multiple times compiling and installing for different ABIs. > > > > Yeah, but it'd be nice not to have to compile subversion three times > > just because we want the python bindings installed in three different > > Python environments. > > You wont be able to prevent this with a general solution, only with some specialized solution inside > the build, if you really want and need that. > Currently, if you want python bindings for three different python environments, you will have to > build everything for all three python environments, even if you only need a subset.
Building everything for all Python ABIs is not required in case of majority of packages, which optionally install Python bindings. Makefiles of many packages (including dev-vcs/subversion) provide separate targets for building/installation of core libraries and various bindings. Example: src_compile() { emake || die if use python; then python_copy_sources bindings/python build_python_bindings() { emake \ PYTHON_INCLUDES="$(python_get_includedir)" \ PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \ python_bindings } python_execute_function -s --source-dir bindings/python build_python_bindings fi } -- Arfrever Frehtes Taifersar Arahesis

Attachments

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