Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555752 - python-utils-r1 eclass - python_wrapper_setup makes python-config return the wrong --prefix
Summary: python-utils-r1 eclass - python_wrapper_setup makes python-config return the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 555594
  Show dependency tree
 
Reported: 2015-07-24 04:12 UTC by Jason Zaman
Modified: 2015-07-27 16:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Zaman gentoo-dev 2015-07-24 04:12:24 UTC
I made the test ebuild to output some stuff:
python_configure() {
    for pc in python-config python3.4-config python2.7-config;
    do
        elog "which ${pc}: $(which ${pc})"
        elog "${pc} --prefix: $(${pc} --prefix)"
        elog "${pc} --includes: $(${pc} --includes)"
        elog "${pc} --libs: $(${pc} --libs)"
    done
}
python_foreach_impl python_configure


 * python3_4: running python_configure

 * which python-config: /var/tmp/portage/sys-process/audit-2.4.3/temp/python3.4/bin/python-config
 * python-config --prefix: /var/tmp/portage/sys-process/audit-2.4.3/temp/python3.4
 * python-config --includes: -I/var/tmp/portage/sys-process/audit-2.4.3/temp/python3.4/include/python3.4 -I/var/tmp/portage/sys-process/audit-2.4.3/temp/python3.4/include/python3.4
 * python-config --libs: -lpthread -ldl -lutil -lm  -lpython3.4

 * which python3.4-config: /usr/bin/python3.4-config
 * python3.4-config --prefix: /usr
 * python3.4-config --includes: -I/usr/include/python3.4 -I/usr/include/python3.4
 * python3.4-config --libs: -lpthread -ldl  -lutil -lm  -lpython3.4


 * python2_7: running python_configure

 * which python-config: /var/tmp/portage/sys-process/audit-2.4.3/temp/python2.7/bin/python-config
 * python-config --prefix: /usr
 * python-config --includes: -I/usr/include/python2.7 -I/usr/include/python2.7
 * python-config --libs: -lpython2.7 -lpthread -ldl -lutil -lm

 * which python2.7-config: /usr/bin/python2.7-config
 * python2.7-config --prefix: /usr
 * python2.7-config --includes: -I/usr/include/python2.7 -I/usr/include/python2.7
 * python2.7-config --libs: -lpython2.7 -lpthread -ldl -lutil -lm


Note the wrong --prefix which also causes the --includes line to be wrong which breaks compiling C modules that include Python.h. pythonX.Y-config all return the right things since they are not handled by python_wrapper_setup. python-config returns the right thing when it points at python2.7-config but broken when points at python3.4-config (I have not tested 3.3). I suspect this may also affect the other python things handled by the wrapper (eg the 'python' and 'python3' symlinks) since python 3.4 added venv support.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-27 16:35:49 UTC
  27 Jul 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
  python_wrapper_setup(): replace symlinks with shell wrappers to avoid
  triggering Python 3.4+ magical prefix support.