2011-06-27 22:57:05 Thomas Sachau napisał(a):
> Dirkjan Ochtman wrote:
> > On Mon, Jun 27, 2011 at 15:08, Fabian Groffen <grob...@gentoo.org> 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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to