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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu May 16 21:09:56 UTC 2019


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>
---
 meta/recipes-devtools/python/python-setuptools.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
index 357aa07086..ad00cbe0ef 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -24,6 +24,7 @@ RDEPENDS_${PN} = "\
   ${PYTHON_PN}-html \
   ${PYTHON_PN}-netserver \
   ${PYTHON_PN}-numbers \
+  ${PYTHON_PN}-pkg-resources \
   ${PYTHON_PN}-pkgutil \
   ${PYTHON_PN}-plistlib \
   ${PYTHON_PN}-shell \
@@ -37,3 +38,6 @@ do_install_prepend() {
 }
 
 BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PYTHON_PN}-pkg-resources "
+FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
-- 
2.20.1



More information about the Openembedded-core mailing list