[yocto] [meta-raspberrypi][PATCH] Add Python modules to support Raspberry Pi Sense Hat

Andrei Gherzan andrei at gherzan.ro
Fri Dec 18 02:38:31 PST 2015


On Fri, Dec 18, 2015 at 12:37 AM, Leon Anavi <leon at anavi.org> wrote:

> Python modules python-sense-hat and python-rtimu have been
> added to support the add-on board Sense Hat for Raspberry Pi.
>
> Python module python-rtimu uses the source code from the
> GitHub repository of RPi-Distro.
>
> Signed-off-by: Leon Anavi <leon at anavi.org>
> ---
>  recipes-devtools/python/python-rtimu_git.bb       | 12 +++++++++
>  recipes-devtools/python/python-sense-hat_2.1.0.bb | 31
> +++++++++++++++++++++++
>  2 files changed, 43 insertions(+)
>  create mode 100644 recipes-devtools/python/python-rtimu_git.bb
>  create mode 100644 recipes-devtools/python/python-sense-hat_2.1.0.bb
>
>
First of all thank you for your contribution and involvement. As this is
your first patch I will try to give you some hints:
1. I would lik eto have this patch split in 2 patches (for each bb file)
2. Then use the commit log following the guidelines here:
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines (Ex:
"python-sense-hat: Add recipe to support..."


> diff --git a/recipes-devtools/python/python-rtimu_git.bb
> b/recipes-devtools/python/python-rtimu_git.bb
> new file mode 100644
> index 0000000..9d2f249
> --- /dev/null
> +++ b/recipes-devtools/python/python-rtimu_git.bb
> @@ -0,0 +1,12 @@
> +DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to
> use 9-dof and 10-dof IMUs with embedded Linux systems"
>

I'm not familiar with this library but as I see it, I don't think is
specific to Raspberrypi. So I'm wondering if it wouldn't be better to have
this in meta-oe for example and the other one, which is definitely rpi
specific, here.


> +HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/"
> +SECTION = "devel/python"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM =
> "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e"
> +
> +SRC_URI = "git://
> github.com/RPi-Distro/RTIMULib.git;protocol=http;branch=master "
> +SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178"
> +
> +S = "${WORKDIR}/git/Linux/python/"
> +
> +inherit setuptools
> diff --git a/recipes-devtools/python/python-sense-hat_2.1.0.bb
> b/recipes-devtools/python/python-sense-hat_2.1.0.bb
> new file mode 100644
> index 0000000..0665536
> --- /dev/null
> +++ b/recipes-devtools/python/python-sense-hat_2.1.0.bb
> @@ -0,0 +1,31 @@
> +SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in
> the Astro Pi mission"
> +HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat"
> +SECTION = "devel/python"
> +LICENSE = "BSD"
> +LIC_FILES_CHKSUM =
> "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda"
> +
> +SRCNAME = "sense-hat"
> +
> +SRC_URI = "
> https://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz
> "
> +
> +SRC_URI[md5sum] = "71217f15ea963040f06e2f50722186ca"
> +SRC_URI[sha256sum] =
> "c6c76707c0ea514e4b0f1f96f1b5b79755875891aae037df7434b6aad7b9dbca"
> +
> +S = "${WORKDIR}/${SRCNAME}-${PV}"
> +
> +inherit setuptools
> +
> +DEPENDS_${PN} += " \
> +               jpeg \
> +               jpeg-dev \
> +               zlib \
> +               zlib-dev \
> +               freetype \
> +               freetype-dev \
> +               "
> +
> +RDEPENDS_${PN} += " \
> +               python-numpy \
> +               python-rtimu \
> +               python-imaging \
> +               "
> --
> 2.5.0
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20151218/5bbedb21/attachment.html>


More information about the yocto mailing list