> On Feb 10, 2016, at 10:54 AM, Phil Blundell wrote: > > On Wed, 2016-02-10 at 17:43 +0000, Khem Raj wrote: >> + cwd=$PWD;cd ${S} >> + STAGING_INCDIR=${STAGING_INCDIR} \ >> + STAGING_LIBDIR=${STAGING_LIBDIR} \ >> + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ >> + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ >> + bbfatal "${PYTHON_PN} setup.py build execution failed." >> + cd $cwd > > Why do you need to save and restore the cwd? If this is a shell task > then the "cd" would be local to that shell invocation anyway, right? > > Also, given that you're invoking it by full pathname as > "${S}/setup.py ..." anyway, do you even need ${S} to be the cwd in the > first place? That seems a bit redundant. yes however there are packages like http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/tree/recipes-devtools/python/rpio_0.10.0.bb and http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/tree/recipes-devtools/python/python-rtimu_git.bb whose build systems were assuming that they were building inside S and were referring to headers include paths relative to source dirs. There might be more of these kinds > > p. > >