[OE-core] [PATCH v4] python*-setuptools: add separate packages for pkg_resources module

Khem Raj raj.khem at gmail.com
Wed May 22 02:06:08 UTC 2019


On Tue, May 21, 2019 at 5:36 AM <luca.boccassi at gmail.com> wrote:
>
> From: Luca Boccassi <luca.boccassi at microsoft.com>
>
> The pkg_resources Python module is useful by itself, for example for
> automatic loading of resources shipped in a Python package.
> Add separate packages for it, so that users can depend on them
> individually and avoid pulling in the entire setuptools, which
> include scripts to download other packages, which might not be
> desired on minimal images.
>
> Other distributions like Debian and Ubuntu already split setuptools
> and pkg-resources in this way.
>
> The setuptools packages now depend on the new pkg-resources packages,
> to avoid regressions for other packages that depend on them
> already.
>
> Signed-off-by: Luca Boccassi <luca.boccassi at microsoft.com>
> ---
> v2: restrict new RDEPENDS to class-target. As advised by Alexander, bitbake
>     cannot resolve native rdeps that mention package names rather than
>     recipe names.
> v3: manually add RPROVIDES to the native class instead of restricting the
>     RDEPENDS to the target class as a better workaround. Also document why
>     the package is being split.
> v4: re-send to the correct thread, no changes.
>
>  meta/recipes-devtools/python/python-setuptools.inc | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
> index 357aa07086..f49e078697 100644
> --- a/meta/recipes-devtools/python/python-setuptools.inc
> +++ b/meta/recipes-devtools/python/python-setuptools.inc
> @@ -37,3 +37,14 @@ do_install_prepend() {
>  }
>
>  BBCLASSEXTEND = "native nativesdk"
> +
> +# The pkg-resources module can be used by itself, without the package downloader
> +# and easy_install. Ship it in a separate package so that it can be used by
> +# minimal distributions.
> +PACKAGES =+ "${PYTHON_PN}-pkg-resources "
> +FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
> +# Due to the way OE-Core implemented native recipes, the native class cannot
> +# have a dependency on something that is not a recipe name. Work around that by
> +# manually setting RPROVIDES.
> +RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
> +RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"

do we need to handle nativesdk case ?

> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


More information about the Openembedded-core mailing list