Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
@ 2015-12-28 12:57 Davide Viti
  2015-12-28 13:24 ` Yegor Yefremov
  2015-12-28 13:25 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Davide Viti @ 2015-12-28 12:57 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Davide Viti <zinosat@tiscali.it>
---
 package/Config.in                              |  1 +
 package/python-paho-mqtt/Config.in             |  9 +++++++++
 package/python-paho-mqtt/python-paho-mqtt.hash |  2 ++
 package/python-paho-mqtt/python-paho-mqtt.mk   | 21 +++++++++++++++++++++
 4 files changed, 33 insertions(+)
 create mode 100644 package/python-paho-mqtt/Config.in
 create mode 100644 package/python-paho-mqtt/python-paho-mqtt.hash
 create mode 100644 package/python-paho-mqtt/python-paho-mqtt.mk

diff --git a/package/Config.in b/package/Config.in
index dd44743..aab1958 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -659,6 +659,7 @@ menu "External python modules"
 	source "package/python-networkmanager/Config.in"
 	source "package/python-nfc/Config.in"
 	source "package/python-numpy/Config.in"
+	source "package/python-paho-mqtt/Config.in"
 	source "package/python-pam/Config.in"
 	source "package/python-posix-ipc/Config.in"
 	source "package/python-protobuf/Config.in"
diff --git a/package/python-paho-mqtt/Config.in b/package/python-paho-mqtt/Config.in
new file mode 100644
index 0000000..1b20da9
--- /dev/null
+++ b/package/python-paho-mqtt/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_PAHO_MQTT
+	bool "python-paho-mqtt"
+	help
+	  The Paho Python Client provides a client class with support
+	  for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also
+	  provides some helper functions to make publishing one off
+	  messages to an MQTT server very straightforward.
+
+	  https://pypi.python.org/pypi/paho-mqtt
diff --git a/package/python-paho-mqtt/python-paho-mqtt.hash b/package/python-paho-mqtt/python-paho-mqtt.hash
new file mode 100644
index 0000000..eb1dfb5
--- /dev/null
+++ b/package/python-paho-mqtt/python-paho-mqtt.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e  paho-mqtt-1.1.tar.gz
diff --git a/package/python-paho-mqtt/python-paho-mqtt.mk b/package/python-paho-mqtt/python-paho-mqtt.mk
new file mode 100644
index 0000000..f039835
--- /dev/null
+++ b/package/python-paho-mqtt/python-paho-mqtt.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# python-paho-mqtt
+#
+################################################################################
+
+PYTHON_PAHO_MQTT_VERSION = 1.1
+PYTHON_PAHO_MQTT_SOURCE = paho-mqtt-$(PYTHON_PAHO_MQTT_VERSION).tar.gz
+PYTHON_PAHO_MQTT_SITE = https://pypi.python.org/packages/source/p/paho-mqtt
+PYTHON_PAHO_MQTT_LICENSE = EPLv1.0 or EDLv1.0
+PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt edl-v10 epl-v10
+PYTHON_PAHO_MQTT_SETUP_TYPE = setuptools
+
+define PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+		$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
+		$(HOST_DIR)/usr/bin/python2 setup.py install \
+		--root=/)
+endef
+
+$(eval $(python-package))
-- 
2.1.4

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-28 12:57 [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package Davide Viti
@ 2015-12-28 13:24 ` Yegor Yefremov
  2015-12-28 13:25 ` Thomas Petazzoni
  1 sibling, 0 replies; 7+ messages in thread
From: Yegor Yefremov @ 2015-12-28 13:24 UTC (permalink / raw)
  To: buildroot

Hi Davide,

On Mon, Dec 28, 2015 at 1:57 PM, Davide Viti <zinosat@tiscali.it> wrote:
> Signed-off-by: Davide Viti <zinosat@tiscali.it>
> ---
>  package/Config.in                              |  1 +
>  package/python-paho-mqtt/Config.in             |  9 +++++++++
>  package/python-paho-mqtt/python-paho-mqtt.hash |  2 ++
>  package/python-paho-mqtt/python-paho-mqtt.mk   | 21 +++++++++++++++++++++
>  4 files changed, 33 insertions(+)
>  create mode 100644 package/python-paho-mqtt/Config.in
>  create mode 100644 package/python-paho-mqtt/python-paho-mqtt.hash
>  create mode 100644 package/python-paho-mqtt/python-paho-mqtt.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index dd44743..aab1958 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -659,6 +659,7 @@ menu "External python modules"
>         source "package/python-networkmanager/Config.in"
>         source "package/python-nfc/Config.in"
>         source "package/python-numpy/Config.in"
> +       source "package/python-paho-mqtt/Config.in"
>         source "package/python-pam/Config.in"
>         source "package/python-posix-ipc/Config.in"
>         source "package/python-protobuf/Config.in"
> diff --git a/package/python-paho-mqtt/Config.in b/package/python-paho-mqtt/Config.in
> new file mode 100644
> index 0000000..1b20da9
> --- /dev/null
> +++ b/package/python-paho-mqtt/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_PYTHON_PAHO_MQTT
> +       bool "python-paho-mqtt"
> +       help
> +         The Paho Python Client provides a client class with support
> +         for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also
> +         provides some helper functions to make publishing one off
> +         messages to an MQTT server very straightforward.
> +
> +         https://pypi.python.org/pypi/paho-mqtt
> diff --git a/package/python-paho-mqtt/python-paho-mqtt.hash b/package/python-paho-mqtt/python-paho-mqtt.hash
> new file mode 100644
> index 0000000..eb1dfb5
> --- /dev/null
> +++ b/package/python-paho-mqtt/python-paho-mqtt.hash
> @@ -0,0 +1,2 @@
> +# Locally computed:
> +sha256  0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e  paho-mqtt-1.1.tar.gz
> diff --git a/package/python-paho-mqtt/python-paho-mqtt.mk b/package/python-paho-mqtt/python-paho-mqtt.mk

please also provide oficial md5 from pypi like we do in for example
package/python-pyudev

> new file mode 100644
> index 0000000..f039835
> --- /dev/null
> +++ b/package/python-paho-mqtt/python-paho-mqtt.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# python-paho-mqtt
> +#
> +################################################################################
> +
> +PYTHON_PAHO_MQTT_VERSION = 1.1
> +PYTHON_PAHO_MQTT_SOURCE = paho-mqtt-$(PYTHON_PAHO_MQTT_VERSION).tar.gz
> +PYTHON_PAHO_MQTT_SITE = https://pypi.python.org/packages/source/p/paho-mqtt
> +PYTHON_PAHO_MQTT_LICENSE = EPLv1.0 or EDLv1.0
> +PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt edl-v10 epl-v10
> +PYTHON_PAHO_MQTT_SETUP_TYPE = setuptools
> +
> +define PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS
> +       (cd $(@D); \
> +               $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
> +               $(HOST_DIR)/usr/bin/python2 setup.py install \
> +               --root=/)
> +endef

Why do you need this and have you tested this with Python3?

> +$(eval $(python-package))
> --
> 2.1.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-28 12:57 [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package Davide Viti
  2015-12-28 13:24 ` Yegor Yefremov
@ 2015-12-28 13:25 ` Thomas Petazzoni
  2015-12-29 22:37   ` Davide Viti
  2015-12-30 21:03   ` Arnout Vandecappelle
  1 sibling, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-12-28 13:25 UTC (permalink / raw)
  To: buildroot

Davide,

On Mon, 28 Dec 2015 13:57:35 +0100, Davide Viti wrote:

> diff --git a/package/python-paho-mqtt/Config.in b/package/python-paho-mqtt/Config.in
> new file mode 100644
> index 0000000..1b20da9
> --- /dev/null
> +++ b/package/python-paho-mqtt/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_PYTHON_PAHO_MQTT
> +	bool "python-paho-mqtt"
> +	help
> +	  The Paho Python Client provides a client class with support
> +	  for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also
> +	  provides some helper functions to make publishing one off
> +	  messages to an MQTT server very straightforward.

I know it was copy/pasted from the website, but this last sentence
doesn't make much sense to me. Maybe it's because I'm not a native
speaker, but "publishing one off messages" is not something that I can
parse. Did they mean "publishing on/off messages" ? Or something else ?

> +PYTHON_PAHO_MQTT_VERSION = 1.1
> +PYTHON_PAHO_MQTT_SOURCE = paho-mqtt-$(PYTHON_PAHO_MQTT_VERSION).tar.gz
> +PYTHON_PAHO_MQTT_SITE = https://pypi.python.org/packages/source/p/paho-mqtt
> +PYTHON_PAHO_MQTT_LICENSE = EPLv1.0 or EDLv1.0
> +PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt edl-v10 epl-v10
> +PYTHON_PAHO_MQTT_SETUP_TYPE = setuptools
> +
> +define PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS
> +	(cd $(@D); \
> +		$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
> +		$(HOST_DIR)/usr/bin/python2 setup.py install \
> +		--root=/)
> +endef

Why do you need to override <pkg>_INSTALL_TARGET_CMDS ?

Using $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) for a target package looks
clearly wrong. Also, since you're not passing
--prefix=$(TARGET_DIR)/usr, I don't see how this overriden install
target commands can even install something in $(TARGET_DIR).

Could you clarify this?

Thanks!

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

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-28 13:25 ` Thomas Petazzoni
@ 2015-12-29 22:37   ` Davide Viti
  2015-12-29 22:45     ` Yegor Yefremov
  2015-12-30 21:03   ` Arnout Vandecappelle
  1 sibling, 1 reply; 7+ messages in thread
From: Davide Viti @ 2015-12-29 22:37 UTC (permalink / raw)
  To: buildroot

*Hi Thomas and Yegor,*

I've tried to rebuild the package using python3 and the build fails finding
$(HOST_DIR)/usr/bin/python2

I guess it's worth discussing the redefinition of
PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS though, since it probably is the
origin of the problems

2015-12-28 14:25 GMT+01:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:

>
> On Mon, 28 Dec 2015 13:57:35 +0100, Davide Viti wrote:
>
> > ...
> > +define PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS
> > +     (cd $(@D); \
> > +             $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
> > +             $(HOST_DIR)/usr/bin/python2 setup.py install \
> > +             --root=/)
> > +endef
>
> Why do you need to override <pkg>_INSTALL_TARGET_CMDS ?
>
> Using $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) for a target package looks
> clearly wrong. Also, since you're not passing
> --prefix=$(TARGET_DIR)/usr, I don't see how this overriden install
> target commands can even install something in $(TARGET_DIR).
>
> Could you clarify this?
>
>
The install stage of the package, fails with the following error (I
replaced the custom paths with "..."):

.../bin/python setup.py install --prefix=... --executable=/usr/bin/python
--single-version-externally-managed --root=/ )
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: option --executable not recognized

I narrowed this down to "--executable" and
"--single-version-externally-managed" not being supported by setup.py
I've looked at packages/pkg-python.mk and tried to fix it overriding
"PYTHON_PAHO_MQTT_BASE_INSTALL_TARGET_OPTS" and
"PYTHON_PAHO_MQTT_INSTALL_TARGET_OPTS" but it did not work, so I ended up
overriding the entire rule.
Never packaged a python module before, so thank you for assisting me in
this process

Davide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151229/98d3a12f/attachment.html>

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-29 22:37   ` Davide Viti
@ 2015-12-29 22:45     ` Yegor Yefremov
  0 siblings, 0 replies; 7+ messages in thread
From: Yegor Yefremov @ 2015-12-29 22:45 UTC (permalink / raw)
  To: buildroot

On Tue, Dec 29, 2015 at 11:37 PM, Davide Viti <zinosat@tiscali.it> wrote:
> Hi Thomas and Yegor,
>
> I've tried to rebuild the package using python3 and the build fails finding
> $(HOST_DIR)/usr/bin/python2
>
> I guess it's worth discussing the redefinition of
> PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS though, since it probably is the origin
> of the problems
>
>
> 2015-12-28 14:25 GMT+01:00 Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com>:
>>
>>
>> On Mon, 28 Dec 2015 13:57:35 +0100, Davide Viti wrote:
>>
>> > ...
>> > +define PYTHON_PAHO_MQTT_INSTALL_TARGET_CMDS
>> > +     (cd $(@D); \
>> > +             $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
>> > +             $(HOST_DIR)/usr/bin/python2 setup.py install \
>> > +             --root=/)
>> > +endef
>>
>> Why do you need to override <pkg>_INSTALL_TARGET_CMDS ?
>>
>> Using $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) for a target package looks
>> clearly wrong. Also, since you're not passing
>> --prefix=$(TARGET_DIR)/usr, I don't see how this overriden install
>> target commands can even install something in $(TARGET_DIR).
>>
>> Could you clarify this?
>>
>
> The install stage of the package, fails with the following error (I replaced
> the custom paths with "..."):
>
> .../bin/python setup.py install --prefix=... --executable=/usr/bin/python
> --single-version-externally-managed --root=/ )
> usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> or: setup.py --help [cmd1 cmd2 ...]
> or: setup.py --help-commands
> or: setup.py cmd --help
>
> error: option --executable not recognized
>
>
> I narrowed this down to "--executable" and
> "--single-version-externally-managed" not being supported by setup.py
> I've looked at packages/pkg-python.mk and tried to fix it overriding
> "PYTHON_PAHO_MQTT_BASE_INSTALL_TARGET_OPTS" and
> "PYTHON_PAHO_MQTT_INSTALL_TARGET_OPTS" but it did not work, so I ended up
> overriding the entire rule.
> Never packaged a python module before, so thank you for assisting me in this
> process

Just change PYTHON_PAHO_MQTT_SETUP_TYPE = setuptools

to

PYTHON_PAHO_MQTT_SETUP_TYPE = distutils

Yegor

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-28 13:25 ` Thomas Petazzoni
  2015-12-29 22:37   ` Davide Viti
@ 2015-12-30 21:03   ` Arnout Vandecappelle
  2016-01-01 17:17     ` Steve Calfee
  1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2015-12-30 21:03 UTC (permalink / raw)
  To: buildroot

On 28-12-15 14:25, Thomas Petazzoni wrote:
> On Mon, 28 Dec 2015 13:57:35 +0100, Davide Viti wrote:
> 
>> > diff --git a/package/python-paho-mqtt/Config.in b/package/python-paho-mqtt/Config.in
>> > new file mode 100644
>> > index 0000000..1b20da9
>> > --- /dev/null
>> > +++ b/package/python-paho-mqtt/Config.in
>> > @@ -0,0 +1,9 @@
>> > +config BR2_PACKAGE_PYTHON_PAHO_MQTT
>> > +	bool "python-paho-mqtt"
>> > +	help
>> > +	  The Paho Python Client provides a client class with support
>> > +	  for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also
>> > +	  provides some helper functions to make publishing one off
>> > +	  messages to an MQTT server very straightforward.
> I know it was copy/pasted from the website, but this last sentence
> doesn't make much sense to me. Maybe it's because I'm not a native
> speaker, but "publishing one off messages" is not something that I can
> parse. Did they mean "publishing on/off messages" ? Or something else ?
> 

 They mean "publishing one-off messages", which I guess translates to having a
simple function to publish a message without the need for setting up a
connection etc.

 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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package
  2015-12-30 21:03   ` Arnout Vandecappelle
@ 2016-01-01 17:17     ` Steve Calfee
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Calfee @ 2016-01-01 17:17 UTC (permalink / raw)
  To: buildroot

On Wed, Dec 30, 2015 at 1:03 PM, Arnout Vandecappelle <arnout@mind.be>
wrote:

> On 28-12-15 14:25, Thomas Petazzoni wrote:
> > On Mon, 28 Dec 2015 13:57:35 +0100, Davide Viti wrote:
> >
> >> > diff --git a/package/python-paho-mqtt/Config.in
> b/package/python-paho-mqtt/Config.in
> >> > new file mode 100644
> >> > index 0000000..1b20da9
> >> > --- /dev/null
> >> > +++ b/package/python-paho-mqtt/Config.in
> >> > @@ -0,0 +1,9 @@
> >> > +config BR2_PACKAGE_PYTHON_PAHO_MQTT
> >> > +  bool "python-paho-mqtt"
> >> > +  help
> >> > +    The Paho Python Client provides a client class with support
> >> > +    for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also
> >> > +    provides some helper functions to make publishing one off
> >> > +    messages to an MQTT server very straightforward.
> > I know it was copy/pasted from the website, but this last sentence
> > doesn't make much sense to me. Maybe it's because I'm not a native
> > speaker, but "publishing one off messages" is not something that I can
> > parse. Did they mean "publishing on/off messages" ? Or something else ?
> >
>
>  They mean "publishing one-off messages", which I guess translates to
> having a
> simple function to publish a message without the need for setting up a
> connection etc.
>
>  Regards,
>  Arnout
>
> ?
> one-off
> British informal
> *adjective*
> adjective: *one-off*
>
>    1. *1*.
>    done, made, or happening only once and not repeated.
>    "one-off tax deductible donations to charity"
>
> *noun*
> noun: *one-off*; plural noun: *one-offs*
>
>    1. *1*.
>    something done, made, or happening only once, not as part of a regular
>    sequence.
>    "the meeting is a one-off"
>    - a person who is unusual or unique, especially in an admirable way.
>       "he's a one-off, no one else has his skills"
>
> ?My interpretation: A hack or something done quick and dirty without
> setting up infrastructure etc.
>

?Regards, Steve?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160101/0bf1c070/attachment.html>

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

end of thread, other threads:[~2016-01-01 17:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-28 12:57 [Buildroot] [PATCH 1/1] python-paho-mqtt: add new package Davide Viti
2015-12-28 13:24 ` Yegor Yefremov
2015-12-28 13:25 ` Thomas Petazzoni
2015-12-29 22:37   ` Davide Viti
2015-12-29 22:45     ` Yegor Yefremov
2015-12-30 21:03   ` Arnout Vandecappelle
2016-01-01 17:17     ` Steve Calfee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox