]> code.ossystems Code Review - openembedded-core.git/commit
pip_install_wheel.bbclass: add helper class
authorTim Orling <ticotimo@gmail.com>
Tue, 22 Feb 2022 19:16:31 +0000 (11:16 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Feb 2022 15:06:46 +0000 (15:06 +0000)
commit32a61afde0e7d8df6634b88525d8c3e8c6c3516e
tree8e33b6b7f9cc5899f3da7f4622b786981c9c1ad3
parent764d0c2e079b3511afe03deadf3ec922e41b89aa
pip_install_wheel.bbclass: add helper class

Provide a helper class to use pip to install wheels built by either
bdist_wheel or a PEP-517 backend.

Set pip install arguments via PIP_INSTALL_ARGS, which can be overriden
by recipes.

Pass --root and --prefix to ensure that pip installs things into the
proper place in sysroot.

By passing --no-deps and --no-index we avoid finicky dependency
checking (pip expects wheels in its cache) and avoid trying to fetch
wheels from pypi.org. This is basically the same behavior we have now,
the dependencies should be declared in the recipe.

Also pass --force-reinstall to make sure built wheels are always installed
so that FILES gets properly populated.

Pass --no-cache to avoid a (harmless) warning about the pip cache in
$HOME be avoiding use of cache. We do not likely want wheels cached
anyway,

pip install changes the python interpreter in scripts installed in
${bindir}, e.g. to #!/usr/bin/nativepython3, correct the behavior after
install to #!/usr/bin/env python3.

[YOCTO #14638]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/pip_install_wheel.bbclass [new file with mode: 0644]