Commit Graph

3 Commits

Author SHA1 Message Date
Ross Burton
177db2d9f6 cython: swap prefix-mapping patch for an upstream commit
Upstream has solved the absolute path problem differently by taking
paths relative to the top of the module.  This appears to solve the
problem, at least I've not found any cases where it breaks.

Drop my patch, and backport the relevant commit from upstream.

(From OE-Core rev: 47f7808dd93e50fb3ecddbf980e40e51dd7376cb)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Ross Burton
121ffba743 classes-recipe/cython: handle builds with no .c sources
This didn't seem to be possible considering the entire point of Cython
is to generate C bindings, but some Python build systems remove the
build tree once the wheel has been generated, so we never get to see the
sources. As xargs will call the specified command even without any files
this results in sed failing.

Pass --no-run-if-empty so that this case doesn't result in an error.

(From OE-Core rev: f1c1bdb05ea8f79a14a4b53e110889b70881f4d7)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-18 22:09:03 +00:00
Ross Burton
64b6e85808 classes-recipe: add cython class
Recipes that use Cython typically also do some bespoke fixup.  Add a
class to centralise the logic:

- Set CYTHON_PREFIX_MAP to stop build paths appearing in generated
  objects
- Strip "Cython Metadata" blocks from generated code that ends up in the
  -src package

(From OE-Core rev: 9752da112b618362d2fe1b61c8939b8410e98553)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-12 23:54:35 +00:00