I got some wheel packages and I would like to install them with pip3 install comand in a recipe. I can load the whl files, but it is not installed.
My current recipe is as follows:
DESCRIPTION="WHL file"
SRC_URI = "file://XXXXXXX.whl"
S = "${WORKDIR}"
LICENSE="CLOSED"
do_install() {
install -d ${D}${libdir}/
install -m 0644 ${S}/XXXXXXX.whl ${D}${libdir}/
# pip3 install XXXXXXX.whl
}
I would like to know how to add pip3 install command.
Thanks everyone.
The bb file should like this:
COMPATIBLE_HOST = "i686.*-mingw.*"
SRC_URI = "https://files.pythonhosted.org/packages/d8/9d/7a8cad803ef73f47134ae5c3804e20b54149ce62a7d1337204f3cf2d1fa1/MarkupSafe-1.1.1-cp35-cp35m-win32.whl;downloadfilename=MarkupSafe-1.1.1-cp35-cp35m-win32.zip;subdir=${BP}"
SRC_URI[md5sum] = "a948c70a1241389d7120db90d69079ca"
SRC_URI[sha256sum] = "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"
inherit nativesdk python3-dir
LICENSE = "BSD-3-Clause"
PV = "1.1.1"
PN = "nativesdk-python3-markupsafe"
LIC_FILES_CHKSUM = "file:///${S}/MarkupSafe-1.1.1.dist-info/LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
do_unpack[depends] += "unzip-native:do_populate_sysroot"
PROVIDES += "nativesdk-python3-markupsafe"
DEPENDS += "nativesdk-python3"
FILES_${PN} += "\
${libdir}/${PYTHON_DIR}/site-packages/* \
"
do_install() {
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/MarkupSafe-1.1.1.dist-info
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/markupsafe
install -m 644 ${S}/markupsafe/* ${D}${libdir}/${PYTHON_DIR}/site-packages/markupsafe/
install -m 644 ${S}/MarkupSafe-1.1.1.dist-info/* ${D}${libdir}/${PYTHON_DIR}/site-packages/MarkupSafe-1.1.1.dist-info/
}
Many thanks for your answer, but this didn’t work to me.
The whl file is already downloaded so I wrote a bb file similar as yours:
DESCRIPTION="WHL files"
SRC_URI = "file://torch-1.6.0-cp37-cp37m-linux_aarch64.whl"
inherit nativesdk python3-dir
LICENSE = "CLOSED"
PV = "1.6.0"
#PN = "nativesdk-python3"
do_unpack[depends] += "unzip-native:do_populate_sysroot"
PROVIDES += "nativesdk-python-whl"
DEPENDS += "nativesdk-python3"
FILES_${PN} += "\
${libdir}/${PYTHON_DIR}/site-packages/* \
"
do_install(){
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/torch-1.6.0.dist-info
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/torch
install -m 644 ${S}/torch/* ${D}${libdir}/${PYTHON_DIR}/site-packages/torch/
install -m 644 ${S}/torch-1.6.0.dist-info/* ${D}${libdir}/${PYTHON_DIR}/site-packages/torch-1.6.0.dist-info/
}
But I got some problems.
First, when I add “inherit nativesdk” I get the following error:
ERROR: Nothing PROVIDES 'virtual/x86_64-pokysdk-linux-gcc'. Close matches:
virtual/x86_64-pokysdk-linux-gcc-crosssdk
virtual/x86_64-pokysdk-linux-go-crosssdk
virtual/x86_64-pokysdk-linux-g++-crosssdk
ERROR: Required build target 'python-whl' has no buildable providers.
Missing or unbuildable dependency chain was: ['python-whl', 'virtual/x86_64-pokysdk-linux-gcc']
Then, if I delete the inherit line the whl does not unpack correctly, so I do not get the such file directory.
Please, how could I fix it?
Regards,
Sonia.