[OE-core] "inherit setuptools" versus "inherit pypi" -- a python style question
Anders Darander
anders at chargestorm.se
Fri Mar 3 09:58:25 UTC 2017
* Robert P. J. Day <rpjday at crashcourse.ca> [170302 12:33]:
> On Thu, 2 Mar 2017, Robert P. J. Day wrote:
> > inherit pypi setuptools
> > require python-psutil.inc
> > and the corresponding .inc file contains:
> > RDEPENDS_${PN} += " \
> > ${PYTHON_PN}-shell \
> > ${PYTHON_PN}-subprocess \
> > ${PYTHON_PN}-threading \
> > "
> > so the first recipe inherits pypi, the second one inherits setuptools,
> > and the third inherits *both*. what is the *preferred* style?
Well, different purposes... If you take a look at pypi.bbclass, it's all
about how to retrieve the module (source code). setuptools.bbclass is
about how to install the module...
Ie retrieving and installing...
Cheers,
Anders
> > i'm assuming that if a python module is availably via pypi, then
> > you'd go with that; otherwise, just use regular setuptools. and not
> > being a python guru, why does that third recipe need to inherit both?
> > i did a quick grep of the current meta-python layer to see the
> > frequency of each, and got:
> grrrrrr ... i just looked more closely and it appears that all of
> the "recipe" files under meta-python that inherit only pypi are all
> ".inc" files, being included by recipe files that first inherit
> setuptools. so, again, clarification on the proper way to do this
> would be nice.
--
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB
More information about the Openembedded-core
mailing list