Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529502 - dev-python/dbus-python-1.2.0 - byte-compilation problems with Python 3
Summary: dev-python/dbus-python-1.2.0 - byte-compilation problems with Python 3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 16:00 UTC by Chris Mayo
Modified: 2014-11-23 17:48 UTC (History)
1 user (show)

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 Chris Mayo 2014-11-16 16:00:17 UTC
USE="-doc examples {-test}" PYTHON_TARGETS="python2_7 (-python3_2) python3_3 python3_4"

dev-lang/python-2.7.8
dev-lang/python-3.3.5-r1
dev-lang/python-3.4.2

Python 3.3 gets legacy named byte-compiled files as well as Python 3 style:

$ find /usr/lib64/python3.3/site-packages/dbus/ -name __init__*
/usr/lib64/python3.3/site-packages/dbus/__init__.pyo
/usr/lib64/python3.3/site-packages/dbus/__pycache__/__init__.cpython-33.pyc
/usr/lib64/python3.3/site-packages/dbus/__pycache__/__init__.cpython-33.pyo
/usr/lib64/python3.3/site-packages/dbus/__init__.pyc
/usr/lib64/python3.3/site-packages/dbus/__init__.py
...

Python 3.4 gets legacy named byte-compiled files and none for Python 3:

$ find /usr/lib64/python3.4/site-packages/dbus/ -name __init__*
/usr/lib64/python3.4/site-packages/dbus/__init__.pyo
/usr/lib64/python3.4/site-packages/dbus/__init__.pyc
/usr/lib64/python3.4/site-packages/dbus/__init__.py
...

(Python 2.7 is fine:
 $  find /usr/lib64/python2.7/site-packages/dbus/ -name __init__*
/usr/lib64/python2.7/site-packages/dbus/__init__.pyo
/usr/lib64/python2.7/site-packages/dbus/__init__.pyc
/usr/lib64/python2.7/site-packages/dbus/__init__.py
...)
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-11-23 14:49:23 UTC
Iirc this is due to an old automake/py-compile being used. Using eautoreconf in the ebuild should fix the issue.
Comment 2 Pacho Ramos gentoo-dev 2014-11-23 15:24:19 UTC
With eautoreconf .pyo and .pyc files are removed for python-3.3 but not for 2.7... is that what it's expected?
Comment 3 Mike Gilbert gentoo-dev 2014-11-23 16:26:22 UTC
The pyc and pyo files should be installed for all impls.

With python 2.7, they should be installed alongside the py files.
With python 3.3 and 3.4, they should be installed in the __pycache__ directory.

eautoreconf works for me.

+  23 Nov 2014; Mike Gilbert <floppym@gentoo.org> dbus-python-1.2.0.ebuild:
+  Update py-compile to fix pyc file installation, bug 529502.
Comment 4 Pacho Ramos gentoo-dev 2014-11-23 16:41:02 UTC
Thanks for the explanation... I am not sure if maybe python eclasses could show a eqawarn message when that files are not installed at proper place... otherwise it's a bit hard to remember to check for them manually on every package :/
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-23 17:31:33 UTC
We could do a install-qa-check.d for that, I think.
Comment 6 Mike Gilbert gentoo-dev 2014-11-23 17:48:05 UTC
+*dbus-python-1.2.0-r1 (23 Nov 2014)
+
+  23 Nov 2014; Mike Gilbert <floppym@gentoo.org> +dbus-python-1.2.0-r1.ebuild,
+  -dbus-python-1.2.0.ebuild:
+  Revbump for last change.