[yocto] Python module and build_ext args

Craig McQueen craig.mcqueen at innerrange.com
Thu Aug 24 21:42:57 PDT 2017


Khem Raj wrote:

On Thu, Aug 24, 2017 at 6:48 PM Craig McQueen <craig.mcqueen at innerrange.com<mailto:craig.mcqueen at innerrange.com>> wrote:
I wrote:
> I'm trying to make a recipe for python3-uvloop, using setuptools3.
>
> The Python 3 uvloop module depends on libuv. It bundles a version of libuv,
> and setup.py tries to build it, but it doesn't work well for cross-compilation.
> However, it also provides a build_ext parameter "--use-system-libuv", which
> seems to work when I try running it manually in devshell. (I have made a
> suitable recipe for libuv and added libuv to DEPENDS.)
>
> How can I specify the "--use-system-libuv" parameter for build_ext in the
> python3-uvloop recipe? I see a reference to DISTUTILS_BUILD_EXT_ARGS,
> but it doesn't seem to be functional.


I see DISTUTILS_BUILD_EXT_ARGS was submitted in this patch:
https://patchwork.openembedded.org/patch/66071/

However, in the Yocto poky repository, I see commit 0221af0f4ee9e8bfb8796841bdf806e38bc600c6 which appears to be a broken version of the above patch with the separate build_ext step not actually executed with the DISTUTILS_BUILD_EXT_ARGS parameters.

You did not explain broken in which sense ?

It is broken in the sense that: The separate build_ext step is not actually executed with the DISTUTILS_BUILD_EXT_ARGS parameters. The original patch submission contained:

          STAGING_INCDIR=${STAGING_INCDIR} \
          STAGING_LIBDIR=${STAGING_LIBDIR} \
          BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
+         build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \
+         --library-dirs ${STAGING_LIBCDIR}/${PYTHON_DIR} \
+         ${DISTUTILS_BUILD_EXT_ARGS} \
+         build ${DISTUTILS_BUILD_ARGS} || \
+         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build_ext ${DISTUTILS_BUILD_ARGS} || \
          bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}

However that part of the patch is not present in commit 0221af0f4ee9e8bfb8796841bdf806e38bc600c6.

--
Craig McQueen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170825/5e1a8be0/attachment.html>


More information about the yocto mailing list