pip_install_wheel: Use BPN instead of PN to construct PYPI_PACKAGE default

This fixes the name for native and nativesdk recipes.

(From OE-Core rev: 498342f483118d22f529c4e255cc50455d51e9ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-02-26 08:20:25 +00:00
parent 49168f5d55
commit 7638fcf5c1

View File

@@ -2,7 +2,7 @@ DEPENDS:append = " python3-pip-native"
def guess_pip_install_package_name(d):
'''https://www.python.org/dev/peps/pep-0491/#escaping-and-unicode'''
return (d.getVar('PYPI_PACKAGE') or d.getVar('PN')).replace('-', '_')
return (d.getVar('PYPI_PACKAGE') or d.getVar('BPN')).replace('-', '_')
PIP_INSTALL_PACKAGE ?= "${@guess_pip_install_package_name(d)}"
PIP_INSTALL_DIST_PATH ?= "${B}/dist"