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

Bug 426330

Summary: net-irc/weechat-3.7 and net-irc/weechat-3.8 have crippled python3 support
Product: Gentoo Linux Reporter: M. B. <tomboy64>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: net-irc, scarabeus
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch proposal for weechat.ebuild
full ebuild
patch proposal for weechat-0.3.8.ebuild
full ebuild
patch proposal for weechat-0.3.8.ebuild

Description M. B. 2012-07-12 15:03:17 UTC
The python detection mechanism in weechat is broken. This results the following message at startup of weechat:
15:52:40 =!= | Fehler: Kann Erweiterung "/usr/lib64/weechat/plugins/python.so" nicht installieren: /usr/lib64/weechat/plugins/python.so: undefined symbol: PyBytes_AsString

My system-python is set to 3.2 (via eselect); i still have python-2.7 installed.

My reasoning behind stating that their detection mechanism is broken:
ebuild /usr/portage/net-irc/weechat-0.3.8/weechat-0.3.8.ebuild unpack &&
cd /var/tmp/portage/net-irc/weechat-0.3.8/work/weechat-0.3.8 &&
cmake . -LA | grep -i python

gives:
PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python
PYTHON_INCLUDE_PATH:PATH=/usr/include/python3.2
PYTHON_LIBRARY:FILEPATH=/usr/lib64/libpython2.7.so

Quickfix: eselect to python-2, emerge, then eselect back to python3. though probably python-updater will break it again upon next run.

PS: I will file a bug with weechat on savannah as well.

Reproducible: Always
Comment 1 M. B. 2012-07-12 18:30:19 UTC
Created attachment 318012 [details, diff]
patch proposal for weechat.ebuild

I fixed weechat to compile the python plugin properly against a USE-flag chosen implementation of python.
Comment 2 M. B. 2012-07-12 18:32:18 UTC
Created attachment 318014 [details]
full ebuild

same as the patch, just as working ebuild.
Comment 3 M. B. 2012-07-12 20:27:41 UTC
Created attachment 318026 [details, diff]
patch proposal for weechat-0.3.8.ebuild

updated version, patch against weechat-0.3.8.ebuild
Comment 4 M. B. 2012-07-12 20:28:30 UTC
Created attachment 318028 [details]
full ebuild

updated version
Comment 5 M. B. 2012-07-12 20:31:16 UTC
Created attachment 318030 [details, diff]
patch proposal for weechat-0.3.8.ebuild

sorry, i striked the last one out. here's the patch again.
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2012-07-17 13:19:11 UTC
Reassigning to @python as I myself don't have py3 anywhere and don't want to fck up anything.

Could anyone of you guys look on this and tell me what to do?
Thanks
Comment 7 M. B. 2012-07-18 17:07:42 UTC
Update: upstream has fixed build in trunk to default to python2. Still there's no support in weechat's build system to choose for the python version except for my hack.
Comment 8 Tomáš Chvátal (RETIRED) gentoo-dev 2012-08-21 13:26:41 UTC
Ok I updated live ebuild and 0.3.8 to always pick the python2 until decided otherwise.
Comment 9 Tomáš Chvátal (RETIRED) gentoo-dev 2013-04-05 10:39:26 UTC
Marking as fixed for 4.0 (different fashion with python-single-r1).

Open a new bug if you find some problems with it please.