Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492632 - sys-apps/i2c-tools - "smbus" python module is not compatible with python 3
Summary: sys-apps/i2c-tools - "smbus" python module is not compatible with python 3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-11-26 19:00 UTC by Marcel Greter
Modified: 2014-10-16 19:00 UTC (History)
1 user (show)

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


Attachments
i2c-tools-3.1.0-r1.tar.gz (i2c-tools-3.1.0-r1.tar.gz,3.44 KB, application/x-gzip-compressed-tar)
2013-11-26 19:06 UTC, Marcel Greter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Greter 2013-11-26 19:00:11 UTC
Hi all

Smbus will not compile for python 3 since the upstream code does not support python 3. There is a patch around for it on the net, but that one does not apply cleanly to the current version and was posted inverted (removals/adds):
http://comments.gmane.org/gmane.linux.drivers.i2c/11290

I tried to make sure that the python 2 module version stays unchanged, but has not been tested at all. I needed the smbus module mainly to test my raspberry pi and didn't want to downgrade everything to pyhton 2. So the only arch tested (only basics) is arm (v6). But since only the interface for the python module registration really changed, I guess it should be ok.

I hope this ebuild/patch is usefull to some people and hopefully upstream will at some time start to suport python3 itself. As I said, the patch is poorly tested, so use it at your own risk.

Best regards
Marcel Greter

Reproducible: Always
Comment 1 Marcel Greter 2013-11-26 19:06:01 UTC
Created attachment 364026 [details]
i2c-tools-3.1.0-r1.tar.gz

The archive will extract it's content into "i2c-tools". To use this ebuild do the fallowing (I will not go into creating a local overlay, I simply assume it's in /usr/local/portage):

mkdir -p /usr/local/portage/sys-apps
{download the attachement from here, i.e. with wget}
tar xzf i2c-tools-3.1.0-r1.tgz -C /usr/local/portage/sys-apps
echo "sys-apps/i2c-tools-3.1.0-r1" >> /etc/portage/package.keywords/sys-apps
emerge -uva sys-apps/i2c-tools
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-11-26 20:18:35 UTC
Comment on attachment 364026 [details]
i2c-tools-3.1.0-r1.tar.gz

Please attach straightforward plain text patches next time.
Comment 3 SpanKY gentoo-dev 2014-10-16 19:00:38 UTC
should be all set now in the tree; thanks for the report!

Commit message: Port to python-3.x
http://sources.gentoo.org/sys-apps/i2c-tools/files/i2c-tools-3.1.1-python-3.patch?rev=1.1
http://sources.gentoo.org/sys-apps/i2c-tools/i2c-tools-3.1.1.ebuild?rev=1.1