On 03/03/17 10:06, Robert P. J. Day wrote: > On Fri, 3 Mar 2017, Anders Darander wrote: > >> * Robert P. J. Day <[email protected]> [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. >
One reason for this is for py2/py3 reciepes. python-foo.bb will inherit setuptools, while python3-foo has to inherit setuptools3. So I would imagine that setuptools should always go in the bb. While pypi is python version agnostic I believe. Cheers, -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
