[OE-core] "inherit setuptools" versus "inherit pypi" -- a python style question

Robert P. J. Day rpjday at crashcourse.ca
Fri Mar 3 10:06:42 UTC 2017


On Fri, 3 Mar 2017, Anders Darander wrote:

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

  yes, i finally twigged to that, but is there a *preferred* style?
from what i've seen, if there is a pair of files for a python module:

  * foo.bb (which includes ...)
  * foo.inc

the common style seems to be that:

  * foo.bb inherits setuptools, while
  * foo.inc inherits pypi (if necessary, of course)

at least i think that was the common style. obviously, there are
perfectly acceptable variations, i'd just like to know if there is a
recommended style.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the Openembedded-core mailing list