All of lore.kernel.org
 help / color / mirror / Atom feed
From: "hongxu" <hongxu.jia@eng.windriver.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] python3-cython: make generated source file be reproducible
Date: Wed, 17 Sep 2025 06:43:55 -0700	[thread overview]
Message-ID: <1435.1758116635407448720@lists.openembedded.org> (raw)
In-Reply-To: <4149a1b0-f423-4942-ba48-6b9f70e8ec61@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]

On Wed, Sep 17, 2025 at 05:26 AM, Gyorgy Sarvari wrote:

> 
> 
>> +diff --git a/Cython/Compiler/ModuleNode.py
>> b/Cython/Compiler/ModuleNode.py
>> +index 6672cb986..ae1625ea2 100644
>> +--- a/Cython/Compiler/ModuleNode.py
>> ++++ b/Cython/Compiler/ModuleNode.py
>> +@@ -779,7 +779,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
>> + code.put_generated_by()
>> + if metadata:
>> + code.putln("/* BEGIN: Cython Metadata")
>> +- code.putln(json.dumps(metadata, indent=4, sort_keys=True))
>> ++ _metadata = json.dumps(metadata, indent=4, sort_keys=True)
>> ++ _metadata = _metadata.replace(os.getcwd()+'/', '')
> 
> I don't think that this is going to work on Windows due to the different
> default path separator (of course for Yocto that doesn't matter much,
> but I think upstream cares about it)

OK, I will use hardcode string 'build_path' to replace actual build path prefix,
it should be portable for both of Linux and Windows.

Please drop this review, v2 incomig

//Hongxu

> 
> Maybe os.path.sep would be more portable?

[-- Attachment #2: Type: text/html, Size: 1219 bytes --]

      reply	other threads:[~2025-09-17 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 12:10 [PATCH] python3-cython: make generated source file be reproducible Hongxu Jia
2025-09-17 12:26 ` [OE-core] " Gyorgy Sarvari
2025-09-17 13:43   ` hongxu [this message]

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=1435.1758116635407448720@lists.openembedded.org \
    --to=hongxu.jia@eng.windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.