Commit Graph

4 Commits

Author SHA1 Message Date
Hongxu Jia
52db4985e5 python3-cython: make generated source file be reproducible
While python3 module use cython to build library, the generated source file
is not stable at each build and made the generated library not be reproducible

This commit replaces un-predictable string with hardcode string in generated
source file to assure the generated library should be reproducible

(From OE-Core rev: 61d98d12eca1c7bdf3b7387a820c83d3b8fad965)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-09-25 11:09:04 +01:00
Trevor Gamblin
c07c578e37 python3-cython: upgrade 3.0.12 -> 3.1.0
Many changes are included with this release, including support for
freethreading builds of CPython 3.13, cleanup of legacy code, and many
other features and bug fixes.

Changelog: https://github.com/cython/cython/blob/master/CHANGES.rst

Patch '0001-Output-import-relative-paths-in-generated-C-code.-GH.patch'
is included in 3.1.0, so we no longer need the backport:

|tgamblin@megalith ~/workspace/git/pythonsrc/cython (master)$ git tag --contains 20bceea6b19ffc2f65b9fba2e4f737f09e5a2b20
|3.1.0
|3.1.0-1
|3.1.0a1
|3.1.0b1
|3.1.0rc1
|3.1.0rc2

Reproducibility looks OK.

(From OE-Core rev: 26a73392524f648015d55bf421a9b1bf5ac0d955)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-15 10:55:26 +01:00
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
b34a4b3b01 python3-cython: add patch to prefix map source paths in generated files
Cython generates C source code that contains mentions to the original
.py files, which results in build paths being embedded inside the
binaries.

Implement prefix remapping to change these build paths to point at the
target debug directory, so that we don't leak build paths and have
reproducible builds.

This patch is currently not submitted upstream, but will be shortly and
I expect it to evolve before being merged.

(From OE-Core rev: cdbe8ef6b744f8e485c4bc77897ad545457ea51e)

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