Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 542948

Summary: python-utils-r1.eclass: PKG_CONFIG_PATH is not set on subsequent calls to python_wrapper_setup
Product: Gentoo Linux Reporter: Mike Gilbert <floppym>
Component: EclassesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mike Gilbert gentoo-dev 2015-03-11 18:16:23 UTC
If python_wrapper_setup has been called once already for a given value of EPYTHON, subsequent calls to python_wrapper_setup with the same EPYTHON do nothing.

This is bad because we set some environment variables like PATH and PKG_CONFIG_SETUP in this function.
Comment 1 Mike Gilbert gentoo-dev 2015-08-07 03:11:12 UTC
Grepping the tree, I think this issue came up in app-emulation/lxc. That ebuild currently does this:

src_configure() {
    append-flags -fno-strict-aliasing

    if use python; then
        #541932
        python_setup "python3*"
        export PKG_CONFIG_PATH="${T}/${EPYTHON}/pkgconfig:${PKG_CONFIG_PATH}"
    fi
...
}

I'm guessing python_wrapper_setup gets called during some earlier distutils-r1 phase function.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-03-10 15:43:50 UTC
This was fixed recently.

ycommit ce87e4f32b37cd41d5f69d089b8ac454ea467974
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Sun Feb 26 11:02:07 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Wed Mar 8 08:35:39 2017

    python-utils-r1.eclass: python_wrapper_setup, fix exporting env
    
    Fix python_wrapper_setup function to move setting environment variables
    for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only
    set on the initial invocation of python_wrapper_setup for the particular
    impl and do not apply to subsequent invocations (e.g. further
    distutils-r1 phases).