From: Ross Burton <Ross.Burton@arm.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>,
Trevor Gamblin <tgamblin@baylibre.com>,
openembedded-core <openembedded-core@lists.openembedded.org>,
Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [OE-core][PATCH] python3-numpy: upgrade 1.26.4 -> 2.1.2
Date: Fri, 1 Nov 2024 21:47:24 +0000 [thread overview]
Message-ID: <53C5ACAC-FD02-457D-B24D-42DDB1568859@arm.com> (raw)
In-Reply-To: <CANNYZj9wt-pmRrGYwE-RRSTX3+VtcU7h_Cug6woqs4k_9NSpNQ@mail.gmail.com>
On 1 Nov 2024, at 10:08, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote:
> 2. The second issue is slightly trickier. There's a number of
> generated c files produced by cython and they contain lines like:
>
> static const char __pyx_k_srv_storage_alex_yocto_build_64[] =
> "/srv/storage/alex/yocto/build-64/tmp/work/core2-64-poky-linux/python3-numpy/2.1.2/numpy-2.1.2/numpy/random/bit_generator.pyx";
> PyObject *__pyx_kp_s_srv_storage_alex_yocto_build_64;
> etc.
>
> This needs to be fixed by tracking down where in cython this stuff is
> generated, and replacing real paths (or parts of them) with something
> reproducible, like 'reproducible_build_path' or similar. Then this
> should be submitted or raised with upstream.
There’s an upstream ticket already: https://github.com/cython/cython/issues/5949.
> 3. We should also drop
> # Python pyx -> c -> so build leaves absolute build paths in the code
> INSANE_SKIP:${PN} += "buildpaths"
> INSANE_SKIP:${PN}-src += "buildpaths"
>
> from meta/classes-recipe/python_mesonpy.bbclass when point two is addressed.
This should be removed from that class anyway, this is a cython workaround so doesn’t have any place in the mesonpy class.
There’s also that .c files generated by cython embed the python include dir (thus, build path) inside a “Cython Metadata” blob. A number of recipes in meta-python strip this out so I’m wondering if we need a cython.bbclass which does something like:
do_compile[postfuncs] = “strip_cython_metadata”
strip_cython_metadata() {
find ${B} -name \*.c -print0 | xargs -0 sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d”
}
Alternatively, patch cython to not generate that metadata in the first place. Apparently there are tools that read it, so leaving it in the tree but stripping it before install seems like the safest option.
Ross
next prev parent reply other threads:[~2024-11-01 21:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 19:37 [OE-core][PATCH] python3-numpy: upgrade 1.26.4 -> 2.1.2 Trevor Gamblin
2024-10-30 14:22 ` Mathieu Dubois-Briand
2024-11-01 10:08 ` Alexander Kanavin
2024-11-01 13:17 ` Trevor Gamblin
2024-11-01 21:47 ` Ross Burton [this message]
2024-11-04 14:20 ` Ross Burton
2024-11-04 14:24 ` Trevor Gamblin
2024-11-05 16:17 ` Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C5ACAC-FD02-457D-B24D-42DDB1568859@arm.com \
--to=ross.burton@arm.com \
--cc=alex.kanavin@gmail.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=tgamblin@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox