Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] python-pyusb: new package
Date: Sat, 26 Oct 2013 01:41:02 +0200	[thread overview]
Message-ID: <526B018E.9080206@mind.be> (raw)
In-Reply-To: <1382742930-11510-1-git-send-email-wzab01@gmail.com>

  Hi Wojciech,

  A few minor nits and one major issue.

On 26/10/13 01:15, Wojciech M. Zabolotny wrote:
> I have considered remarks provided by Ryan Barnett and Thomas De Schampheleire.
> I hope that now the package definition is correct.

  Comments like this should not appear in the git history. You can do 
that by putting them below the Signed-off-by line, separated with --- on 
a line on its own. The part below the --- line is removed when the patch 
is committed with git am.

  Also, when sending an update, it is customary to add v2 to the subject 
so people can see which version is the latest one. You can do that by 
calling
git send-email -v2 # Since git 1.8.x
or
git send-email --subject-prefix='PATCH v2'

>
> Signed-off-by: Wojciech M. Zabolotny <wzab01@gmail.com>
> ---
>   package/Config.in                    |  1 +
>   package/python-pyusb/Config.in       | 10 ++++++++++
>   package/python-pyusb/python-pyusb.mk | 37 ++++++++++++++++++++++++++++++++++++
>   3 files changed, 48 insertions(+)
>   create mode 100644 package/python-pyusb/Config.in
>   create mode 100644 package/python-pyusb/python-pyusb.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 0e6f86c..40dba0c 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -400,6 +400,7 @@ source "package/python-protobuf/Config.in"
>   source "package/python-pygame/Config.in"
>   source "package/python-pyparsing/Config.in"
>   source "package/python-pyro/Config.in"
> +source "package/python-pyusb/Config.in"
>   source "package/python-pyzmq/Config.in"
>   source "package/python-serial/Config.in"
>   source "package/python-setuptools/Config.in"
> diff --git a/package/python-pyusb/Config.in b/package/python-pyusb/Config.in
> new file mode 100644
> index 0000000..3a1242a
> --- /dev/null
> +++ b/package/python-pyusb/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_PYTHON_PYUSB
> +	bool "python-pyusb"
> +	depends on BR2_PACKAGE_PYTHON
> +	select BR2_PACKAGE_LIBUSB

  libusb depends on threads so you should have

	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb

and

comment "python-pyusb needs a toolchain w/ threads"
	depends on BR2_PACKAGE_PYTHON
         depends on !BR2_TOOLCHAIN_HAS_THREADS

> +	help
> +	  The PyUSB module provides for Python easy access to the host
> +	  machine's Universal Serial Bus (USB) system.
> +	

  Empty lines should be really empty, not contain spaces.

> +	  http://sourceforge.net/apps/trac/pyusb/
> +

  Spurious empty line.

> diff --git a/package/python-pyusb/python-pyusb.mk b/package/python-pyusb/python-pyusb.mk
> new file mode 100644
> index 0000000..80609af
> --- /dev/null
> +++ b/package/python-pyusb/python-pyusb.mk
> @@ -0,0 +1,37 @@
> +################################################################################
> +#
> +# python-pyusb
> +#
> +################################################################################
> +
> +PYTHON_PYUSB_VERSION = 0546cad8980783c39f96db717005a550059b730f
> +PYTHON_PYUSB_SITE = http://github.com/walac/pyusb/tarball/$(PYTHON_PYUSB_VERSION)
> +PYTHON_PYUSB_LICENSE = BSD-3c
> +PYTHON_PYUSB_LICENSE_FILES = LICENSE
> +
> +PYTHON_PYUSB_DEPENDENCIES = python libusb

  libusb is only a runtime dependency, so it doesn't need to be added to 
the dependencies list.

  Otherwise, looks good :-)

  Regards,
  Arnout

> +
> +# Copied from python-pyparsing, based on python-pygame
> +define PYTHON_PYUSB_BUILD_CMDS
> +	(cd $(@D);                                              \
> +	 CC="$(TARGET_CC)"                                      \
> +	 CFLAGS="$(TARGET_CFLAGS)"                              \
> +	 LDSHARED="$(TARGET_CROSS)gcc -shared"                  \
> +	 CROSS_COMPILING=yes                                    \
> +	 _python_sysroot=$(STAGING_DIR)                         \
> +	 _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION)    \
> +	 _python_prefix=/usr                                    \
> +	 _python_exec_prefix=/usr                               \
> +	 $(HOST_DIR)/usr/bin/python setup.py build              \
> +	)
> +endef
> +
> +# Copied from python-pyparsing, based on python-pygame
> +define PYTHON_PYUSB_INSTALL_TARGET_CMDS
> +	(cd $(@D);                                              \
> +	 $(HOST_DIR)/usr/bin/python setup.py install            \
> +	                            --prefix=$(TARGET_DIR)/usr  \
> +	)
> +endef
> +
> +$(eval $(generic-package))
>


-- 
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

  reply	other threads:[~2013-10-25 23:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-25 12:54 [Buildroot] [PATCH 1/1] Added pyusb as a package Wojciech M. Zabolotny
2013-10-25 15:26 ` Ryan Barnett
2013-10-25 16:50 ` Thomas De Schampheleire
2013-10-24 23:42   ` [Buildroot] [PATCH 1/1] Added jack2 as a package. Due to alignment errors on ARM platform, git sources are used Wojciech M. Zabolotny
2013-10-24 23:48     ` Wojciech Zabolotny
2013-10-25 23:36     ` [Buildroot] [PATCH 1/1] jack2: new package Wojciech M. Zabolotny
2013-10-27 17:10       ` Thomas Petazzoni
2013-10-27 19:50         ` [Buildroot] [PATCH v2 " Wojciech M. Zabolotny
2013-10-28 19:27           ` Thomas Petazzoni
2013-10-29 18:55             ` [Buildroot] [PATCH v3 " Wojciech M. Zabolotny
2013-10-29 19:34               ` Thomas Petazzoni
2013-10-30  0:00                 ` Wojciech Zabolotny
2013-10-30  0:14                   ` Thomas Petazzoni
2013-10-30 15:46                     ` [Buildroot] [PATCH v4 " Wojciech M. Zabolotny
2014-03-07 23:10                       ` Thomas Petazzoni
2013-10-25 23:15   ` [Buildroot] [PATCH 1/1] python-pyusb: " Wojciech M. Zabolotny
2013-10-25 23:41     ` Arnout Vandecappelle [this message]
2013-10-26  7:25       ` Wojciech M. Zabolotny
2013-10-26  7:35         ` [Buildroot] [PATCH v2 " Wojciech M. Zabolotny
2013-10-26  7:33       ` [Buildroot] [PATCH " Wojciech Zabolotny
2013-10-28  7:12         ` Arnout Vandecappelle
2013-10-28  8:10           ` Baruch Siach
2013-10-28  8:24             ` Arnout Vandecappelle
2013-10-28  8:40               ` Baruch Siach
2013-10-28  8:47                 ` Arnout Vandecappelle
2013-10-28  9:03                   ` Baruch Siach
  -- strict thread matches above, loose matches on Subject: below --
2013-10-25 23:05 [Buildroot] [PATCH 1/1] Package python-pyusb added Wojciech M. Zabolotny
2013-10-25 23:09 ` Wojciech Zabolotny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=526B018E.9080206@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox