All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file
@ 2015-04-05 22:15 Ryan Barnett
  2015-04-05 22:15 ` [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension Ryan Barnett
  2015-04-06  9:03 ` [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Thomas Petazzoni
  0 siblings, 2 replies; 8+ messages in thread
From: Ryan Barnett @ 2015-04-05 22:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v2->v3:
 - None
---
 package/i2c-tools/i2c-tools.hash | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 package/i2c-tools/i2c-tools.hash

diff --git a/package/i2c-tools/i2c-tools.hash b/package/i2c-tools/i2c-tools.hash
new file mode 100644
index 0000000..a6c376f
--- /dev/null
+++ b/package/i2c-tools/i2c-tools.hash
@@ -0,0 +1,2 @@
+# locally computed hash
+sha256	14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700  i2c-tools-3.1.1.tar.bz2
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-05 22:15 [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Ryan Barnett
@ 2015-04-05 22:15 ` Ryan Barnett
  2015-04-06  9:03   ` Thomas Petazzoni
  2015-04-06  9:03 ` [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Thomas Petazzoni
  1 sibling, 1 reply; 8+ messages in thread
From: Ryan Barnett @ 2015-04-05 22:15 UTC (permalink / raw)
  To: buildroot

Add a config option to build the python bindings for i2c-tools -
py-smbus. The steps for building the python bindings is the same as
the distutil steps that are a part of the python infrastructure.

Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
CC: Baruch Siach <baruch@tkos.co.il>
CC: Yann E. MORIN <yann.morin.1998@free.fr>

---
Changes v4 -> v5:
 - Actually send v4 change :)

Changes v3 -> v4:
 - Move define of BASE_ENV under BR2_PACKAGE_PYTHON (Yann)

Changes v2 -> v3:
 - Removed Config.in entry (suggested by Baruch)
 - Moved install and build defines with the CMD block (suggested
   by Yann)

Changes v1 -> v2:
 - Fixed spelling in config entry
 - Utilize the python infrastructure variables for environment and
   build/install opts (suggested by Thomas P)
 - Only support python2.7 since this is not compatabile with python3
   (suggested by Baruch)
---
 package/i2c-tools/i2c-tools.mk | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk
index 0115e22..6c156ca 100644
--- a/package/i2c-tools/i2c-tools.mk
+++ b/package/i2c-tools/i2c-tools.mk
@@ -10,8 +10,34 @@ I2C_TOOLS_SITE = http://dl.lm-sensors.org/i2c-tools/releases
 I2C_TOOLS_LICENSE = GPLv2+, GPLv2 (py-smbus)
 I2C_TOOLS_LICENSE_FILES = COPYING
 
+# Build/install steps mirror the distutil python package type in the python package
+# infrastructure
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+I2C_TOOLS_DEPENDENCIES += python
+# BASE_ENV taken from PKG_PYTHON_DISTUTILS_ENV in package/pkg-python.mk
+I2C_TOOLS_PYTHON_BASE_ENV = \
+	$(PKG_PYTHON_DISTUTILS_ENV) \
+	CFLAGS="$(TARGET_CFLAGS) -I../include"
+
+define I2C_TOOLS_BUILD_PYSMBUS
+	(cd $(@D)/py-smbus;  \
+	$(I2C_TOOLS_PYTHON_BASE_ENV) \
+		$(HOST_DIR)/usr/bin/python setup.py build \
+		$(PKG_PYTHON_DISTUTILS_BUILD_OPTS))
+endef
+
+define I2C_TOOLS_INSTALL_PYSMBUS
+	(cd $(@D)/py-smbus; \
+	$(I2C_TOOLS_PYTHON_BASE_ENV) \
+		$(HOST_DIR)/usr/bin/python setup.py install \
+		$(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS))
+endef
+
+endif # BR2_PACKAGE_PYTHON
+
 define I2C_TOOLS_BUILD_CMDS
 	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(I2C_TOOLS_BUILD_PYSMBUS)
 endef
 
 define I2C_TOOLS_INSTALL_TARGET_CMDS
@@ -19,6 +45,7 @@ define I2C_TOOLS_INSTALL_TARGET_CMDS
 	do \
 		$(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \
 	done
+	$(I2C_TOOLS_INSTALL_PYSMBUS)
 endef
 
 $(eval $(generic-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file
  2015-04-05 22:15 [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Ryan Barnett
  2015-04-05 22:15 ` [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension Ryan Barnett
@ 2015-04-06  9:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-04-06  9:03 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett,

On Sun,  5 Apr 2015 17:15:04 -0500, Ryan Barnett wrote:
> Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> Changes v2->v3:
>  - None
> ---
>  package/i2c-tools/i2c-tools.hash | 2 ++
>  1 file changed, 2 insertions(+)
>  create mode 100644 package/i2c-tools/i2c-tools.hash

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-05 22:15 ` [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension Ryan Barnett
@ 2015-04-06  9:03   ` Thomas Petazzoni
  2015-04-06  9:07     ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2015-04-06  9:03 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett,

On Sun,  5 Apr 2015 17:15:05 -0500, Ryan Barnett wrote:
> Add a config option to build the python bindings for i2c-tools -
> py-smbus. The steps for building the python bindings is the same as
> the distutil steps that are a part of the python infrastructure.
> 
> Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
> CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> CC: Baruch Siach <baruch@tkos.co.il>
> CC: Yann E. MORIN <yann.morin.1998@free.fr>

Applied. Did you check that i2c-tools python support was Python 2 only?
Or does it also support Python 3 ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-06  9:03   ` Thomas Petazzoni
@ 2015-04-06  9:07     ` Yann E. MORIN
  2015-04-09  6:32       ` Angelo Compagnucci
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-04-06  9:07 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-04-06 11:03 +0200, Thomas Petazzoni spake thusly:
> On Sun,  5 Apr 2015 17:15:05 -0500, Ryan Barnett wrote:
> > Add a config option to build the python bindings for i2c-tools -
> > py-smbus. The steps for building the python bindings is the same as
> > the distutil steps that are a part of the python infrastructure.
> > 
> > Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
> > CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > CC: Baruch Siach <baruch@tkos.co.il>
> > CC: Yann E. MORIN <yann.morin.1998@free.fr>
> 
> Applied. Did you check that i2c-tools python support was Python 2 only?
> Or does it also support Python 3 ?

Yes, it is Python-2 only (see the v1->v2 changelog in the commit notes).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-06  9:07     ` Yann E. MORIN
@ 2015-04-09  6:32       ` Angelo Compagnucci
  2015-04-09 13:11         ` Ryan Barnett
  0 siblings, 1 reply; 8+ messages in thread
From: Angelo Compagnucci @ 2015-04-09  6:32 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett, Yann E. MORIN, Thomas Petazzoni,

2015-04-06 11:07 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Thomas, All,
>
> On 2015-04-06 11:03 +0200, Thomas Petazzoni spake thusly:
>> On Sun,  5 Apr 2015 17:15:05 -0500, Ryan Barnett wrote:
>> > Add a config option to build the python bindings for i2c-tools -
>> > py-smbus. The steps for building the python bindings is the same as
>> > the distutil steps that are a part of the python infrastructure.
>> >
>> > Signed-off-by: Ryan Barnett <ryanbarnett3@gmail.com>
>> > CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> > CC: Baruch Siach <baruch@tkos.co.il>
>> > CC: Yann E. MORIN <yann.morin.1998@free.fr>
>>
>> Applied. Did you check that i2c-tools python support was Python 2 only?
>> Or does it also support Python 3 ?
>
> Yes, it is Python-2 only (see the v1->v2 changelog in the commit notes).

This is not true! Py-smbus supports python 3, se the commit here for
further reference:

http://www.lm-sensors.org/changeset/6267

Sincerely, Angelo

> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-09  6:32       ` Angelo Compagnucci
@ 2015-04-09 13:11         ` Ryan Barnett
  2015-04-09 20:26           ` Angelo Compagnucci
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Barnett @ 2015-04-09 13:11 UTC (permalink / raw)
  To: buildroot

Angelo,

On Thu, Apr 9, 2015 at 1:32 AM, Angelo Compagnucci
<angelo.compagnucci@gmail.com> wrote:
> Dear Ryan Barnett, Yann E. MORIN, Thomas Petazzoni,
>
>>> Applied. Did you check that i2c-tools python support was Python 2 only?
>>> Or does it also support Python 3 ?
>>
>> Yes, it is Python-2 only (see the v1->v2 changelog in the commit notes).
>
> This is not true! Py-smbus supports python 3, se the commit here for
> further reference:
>
> http://www.lm-sensors.org/changeset/6267

When I tried to compile for Python 3 - I had many errors about not
finding Python3 functions. I would image that was probably due to the
fact that the include paths weren't correct. However, at that time I
had lost interest.

Please feel free to add support for Python 3 for py-smbus (i2c-tools).
Will be sure to review and test it.

Thanks,
-Ryan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension
  2015-04-09 13:11         ` Ryan Barnett
@ 2015-04-09 20:26           ` Angelo Compagnucci
  0 siblings, 0 replies; 8+ messages in thread
From: Angelo Compagnucci @ 2015-04-09 20:26 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett,

2015-04-09 15:11 GMT+02:00 Ryan Barnett <ryanbarnett3@gmail.com>:
> Angelo,
>
> On Thu, Apr 9, 2015 at 1:32 AM, Angelo Compagnucci
> <angelo.compagnucci@gmail.com> wrote:
>> Dear Ryan Barnett, Yann E. MORIN, Thomas Petazzoni,
>>
>>>> Applied. Did you check that i2c-tools python support was Python 2 only?
>>>> Or does it also support Python 3 ?
>>>
>>> Yes, it is Python-2 only (see the v1->v2 changelog in the commit notes).
>>
>> This is not true! Py-smbus supports python 3, se the commit here for
>> further reference:
>>
>> http://www.lm-sensors.org/changeset/6267
>
> When I tried to compile for Python 3 - I had many errors about not
> finding Python3 functions. I would image that was probably due to the
> fact that the include paths weren't correct. However, at that time I
> had lost interest.
>
> Please feel free to add support for Python 3 for py-smbus (i2c-tools).
> Will be sure to review and test it.

Mea culpa! The version with python3 support is not released, the
support is only in trunk!

Sincerely, Angelo.

>
> Thanks,
> -Ryan



-- 
Profile: http://it.linkedin.com/in/compagnucciangelo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-09 20:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-05 22:15 [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Ryan Barnett
2015-04-05 22:15 ` [Buildroot] [PATCH v5 2/2] i2c-tools: add support to build python extension Ryan Barnett
2015-04-06  9:03   ` Thomas Petazzoni
2015-04-06  9:07     ` Yann E. MORIN
2015-04-09  6:32       ` Angelo Compagnucci
2015-04-09 13:11         ` Ryan Barnett
2015-04-09 20:26           ` Angelo Compagnucci
2015-04-06  9:03 ` [Buildroot] [PATCH v5 1/2] i2c-tools: add hash file Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.