* [Buildroot] Untypical situation - python-smbus which is also a part of i2c-tools.
@ 2013-12-24 21:33 Wojciech Zabolotny
2014-01-09 7:00 ` Arnout Vandecappelle
0 siblings, 1 reply; 2+ messages in thread
From: Wojciech Zabolotny @ 2013-12-24 21:33 UTC (permalink / raw)
To: buildroot
I needed to assure access to i2c peripherals from Python programs in
my buildroot based embedded system.
There is a py-smbus module, which is available as a part of i2c-tools,
but which is not compiled during compilation of this package, and uses
other tools for compilation.
Simple addition of EXTRA="py-smbus" when executing make (as described
in original README) doesn't help as it was discussed in a thread:
http://lists.busybox.net/pipermail/buildroot/2013-June/074037.html
After some review of some packages which use python components, I have
got the attached mk file, which works, but is not a clean solution.
I don't know if there is a cleaner way to achieve that?
The ideal solution would be probably to allow selection of the
python-smbus as a part of the i2c-tools package.
How should it be done?
--
Regards,
Wojciech M. Zabo?otny
My GPG/PGP keys:
standard: B191 ACF0 7909 83FA 3F9B 450C 407E 3C4B 4569 D119
confidential: 2BF3 F90F 6EA8 7D35 59FD 5080 78ED 33DE 1312 D8F8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Config.in
Type: application/octet-stream
Size: 229 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131224/92a8d954/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-smbus.mk
Type: application/octet-stream
Size: 1944 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131224/92a8d954/attachment-0001.obj>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] Untypical situation - python-smbus which is also a part of i2c-tools.
2013-12-24 21:33 [Buildroot] Untypical situation - python-smbus which is also a part of i2c-tools Wojciech Zabolotny
@ 2014-01-09 7:00 ` Arnout Vandecappelle
0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2014-01-09 7:00 UTC (permalink / raw)
To: buildroot
Hi Wojciech,
[I'm catching up on old mail...]
On 24/12/13 22:33, Wojciech Zabolotny wrote:
> I needed to assure access to i2c peripherals from Python programs in
> my buildroot based embedded system.
> There is a py-smbus module, which is available as a part of i2c-tools,
> but which is not compiled during compilation of this package, and uses
> other tools for compilation.
>
> Simple addition of EXTRA="py-smbus" when executing make (as described
> in original README) doesn't help as it was discussed in a thread:
> http://lists.busybox.net/pipermail/buildroot/2013-June/074037.html
>
> After some review of some packages which use python components, I have
> got the attached mk file, which works, but is not a clean solution.
> I don't know if there is a cleaner way to achieve that?
For me, the solution you propose is not that bad. We have several
packages (kernel-headers and u-boot-tools are the most important ones)
that share their source with another package.
One small thing though: it should use $(PYTHON_SMBUS_VERSION) instead
of $(I2C_TOOLS_VERSION). And of course it should now use the generic
python package infrastructure. FYI I've attached an example of these changes.
> The ideal solution would be probably to allow selection of the
> python-smbus as a part of the i2c-tools package.
> How should it be done?
That is also an acceptable option, but then you can't use the generic
python package infrastructure anymore (except by using
PKG_PYTHON_DISTUTILS_ENV). You can add the PYTHON_SMBUS_BUILD_CMDS to
I2C_TOOLS_POST_BUILD_HOOKS.
However, I'm not convinced that's it's cleaner, because it offers no
way to build py-smbus without the rest of the i2c-tools. Of course, this
additional 100K won't matter when you have python installed, but in
principle we try to keep things as small as possible.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
-------------- next part --------------
################################################################################
#
# python-smbus
#
################################################################################
PYTHON_SMBUS_VERSION = 3.1.0
PYTHON_SMBUS_SOURCE = i2c-tools-$(PYTHON_SMBUS_VERSION).tar.bz2
PYTHON_SMBUS_SITE = http://dl.lm-sensors.org/i2c-tools/releases
PYTHON_SMBUS_SETUP_TYPE = distutils
PYTHON_SMBUS_SUBDIR = py-smbus
PYTHON_SMBUS_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I../include"
PYTHON_SMBUS_LICENSE = MIT
$(eval $(python-package))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-09 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-24 21:33 [Buildroot] Untypical situation - python-smbus which is also a part of i2c-tools Wojciech Zabolotny
2014-01-09 7:00 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox