[yocto] Installing setup.py after cmake build in one recipe

Patryk Łaś patryk.las at slabs.pl
Wed Mar 14 15:31:02 PDT 2018


Hi,

Since few days I am dealing with problem in compiling my recipe in which I
am downloading git repositories patch them, compiling (via cmake) and
finally running setup.py. I have to do it in mentioned order because cmake
gives me *.so library which is required by setup.py instalator. Python
setup.py is located inside repository like: "${S}/python/setup.py" where
S=${WORKDIR}/git.

Recipe compiles fine (bitbake my_recipe) but it does not included in final
system image (added entry to add recipe into main image). What is more
there is not site-packages for build in tmp but setup.py seemd to be
invoked.

My recipe:

LICENSE = "CLOSED"
BB_STRICT_CHECKSUM = "0"
SECTION = "devel/python"
PV = "1.0"
DEPENDS = "boost udev swig-native python python-setuptools python-native
python-setuptools-native python-distutils-extra-native"

SRC_URI = " \
    git://github.com/myrepo1;protocol=https;name=A \
    git://github.com/myrepo2;protocol=https;name=B \
    file://0001-patch1.patch \
"
SRCREV_A = "404ff3eeff0d79c15cbfdbc126c4bff2996baea6"
SRCREV_B = "5e883c2a3f5373dbd1ea34e6095f9433bea2b0b3"

S = "${WORKDIR}/git"


PARALLEL_MAKEINST = ""

DISTUTILS_INSTALL_ARGS +=
"--install-lib=${libdir}/${PYTHON_DIR}/site-packages"

inherit cmake

FILES_${PN} += "${libdir}/${PYTHON_DIR}/*"

do_compile_prepend() {
    export STAGING_LIBDIR=${STAGING_LIBDIR}
    export STAGING_INCDIR=${STAGING_INCDIR}
}

do_install() {
    export STAGING_LIBDIR=${STAGING_LIBDIR}
    export STAGING_INCDIR=${STAGING_INCDIR}
    ${STAGING_BINDIR_NATIVE}/python-native/python ${S}/python/setup.py
install
}

-- 

*Patryk Łaś*

Embedded Specialist

+ 48 503 165 819


*patryk.las at slabs.pl <patryk.las at slabs.pl>*

Dworska 1A/1U

30-314 Kraków

Polska
NIP 9452185706
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180314/1256f199/attachment.html>


More information about the yocto mailing list