On Thu, 4 May 2023 at 10:41, Peter Bergin <pe...@berginkonsult.se> wrote:

> At
> https://github.com/pyca/cryptography/blob/f816b457494e010b655cd7fdcd30e3446f86a703/src/rust/build.rs#L46
> the path to python includes is defined by calling 'python3 -c "import
> sysconfig; print(sysconfig.get_path('include'))"' (but from inside
> rust). With print-debugging this seems to return the bad string
> '/usr/include/python3.11' which is then passed to cc::Build
>
> I executed this in recipe context:
>
> do_compile:prepend() {
>      which python3
>      python3 -c "import sysconfig; print(sysconfig.get_path('include'))"
> }
>
> and then I got the correct return value:
>
> |
> /work/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-cryptography/40.0.2-r0/recipe-sysroot-native/usr/bin/python3-native/python3
> |
> /work/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-cryptography/40.0.2-r0/recipe-sysroot-native/usr/include/python3.11

This is pointing to the native sysroot in a target build, so it is
most likely not actually correct. I believe 'inherit
python3targetconfig' may help, as it substitutes most places where
native python gets queried by components with target-specific values.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180855): 
https://lists.openembedded.org/g/openembedded-core/message/180855
Mute This Topic: https://lists.openembedded.org/mt/98667212/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to