Message ID | 20250926081914.3127272-3-hongxu.jia@windriver.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-python,v4,1/6] python3-frozenlist: support reproducibility | expand |
On 9/26/25 1:19 AM, hongxu via lists.openembedded.org wrote: > In order to make the generated library be reproducible, build wheel > in source dir other than tmp dir (/tmp/xxxxxx), then yocto toolchain's > option -fdebug-prefix-map could work as expected > > Note: To support reproducible, it also requires oe-core commit [1] to be merged > > [1] https://git.openembedded.org/openembedded-core/commit/?id=61d98d12eca1c7bdf3b7387a820c83d3b8fad965 > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > .../0001-build-wheel-in-place.patch | 31 +++++++++++++++++++ > .../python/python3-yarl_1.20.1.bb | 4 +++ > 2 files changed, 35 insertions(+) > create mode 100644 meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch > > diff --git a/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch b/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch > new file mode 100644 > index 0000000000..84f81da775 > --- /dev/null > +++ b/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch > @@ -0,0 +1,31 @@ > +From 606843ad079d9d0dac1172533d42b5a2327b99ed Mon Sep 17 00:00:00 2001 > +From: Hongxu Jia <hongxu.jia@windriver.com> > +Date: Wed, 17 Sep 2025 15:41:09 +0800 > +Subject: [PATCH] build wheel in place > + > +In order to make the generated library be reproducible, build wheel > +in source dir other than tmp dir (/tmp/xxxxxx), then yocto toolchain's > +option -fdebug-prefix-map could work as expected > + > +Upstream-Status: Pending same here, please submit it upstream > +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > +--- > + packaging/pep517_backend/_backend.py | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py > +index 61cad34..d5d839e 100644 > +--- a/packaging/pep517_backend/_backend.py > ++++ b/packaging/pep517_backend/_backend.py > +@@ -316,7 +316,7 @@ def build_wheel( > + """ > + with maybe_prebuild_c_extensions( > + line_trace_cython_when_unset=False, > +- build_inplace=False, > ++ build_inplace=True, > + config_settings=config_settings, > + ): > + return _setuptools_build_wheel( > +-- > +2.34.1 > + > diff --git a/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb b/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb > index bbf9e3d782..6eedcf0f82 100644 > --- a/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb > +++ b/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb > @@ -9,6 +9,10 @@ PYPI_PACKAGE = "yarl" > > inherit pypi ptest-python-pytest python_setuptools_build_meta cython > > +SRC_URI += " \ > + file://0001-build-wheel-in-place.patch \ > +" > + > DEPENDS += " \ > python3-expandvars-native \ > " > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#119901): https://lists.openembedded.org/g/openembedded-devel/message/119901 > Mute This Topic: https://lists.openembedded.org/mt/115445262/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch b/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch new file mode 100644 index 0000000000..84f81da775 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch @@ -0,0 +1,31 @@ +From 606843ad079d9d0dac1172533d42b5a2327b99ed Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Wed, 17 Sep 2025 15:41:09 +0800 +Subject: [PATCH] build wheel in place + +In order to make the generated library be reproducible, build wheel +in source dir other than tmp dir (/tmp/xxxxxx), then yocto toolchain's +option -fdebug-prefix-map could work as expected + +Upstream-Status: Pending +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + packaging/pep517_backend/_backend.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py +index 61cad34..d5d839e 100644 +--- a/packaging/pep517_backend/_backend.py ++++ b/packaging/pep517_backend/_backend.py +@@ -316,7 +316,7 @@ def build_wheel( + """ + with maybe_prebuild_c_extensions( + line_trace_cython_when_unset=False, +- build_inplace=False, ++ build_inplace=True, + config_settings=config_settings, + ): + return _setuptools_build_wheel( +-- +2.34.1 + diff --git a/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb b/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb index bbf9e3d782..6eedcf0f82 100644 --- a/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb +++ b/meta-python/recipes-devtools/python/python3-yarl_1.20.1.bb @@ -9,6 +9,10 @@ PYPI_PACKAGE = "yarl" inherit pypi ptest-python-pytest python_setuptools_build_meta cython +SRC_URI += " \ + file://0001-build-wheel-in-place.patch \ +" + DEPENDS += " \ python3-expandvars-native \ "
In order to make the generated library be reproducible, build wheel in source dir other than tmp dir (/tmp/xxxxxx), then yocto toolchain's option -fdebug-prefix-map could work as expected Note: To support reproducible, it also requires oe-core commit [1] to be merged [1] https://git.openembedded.org/openembedded-core/commit/?id=61d98d12eca1c7bdf3b7387a820c83d3b8fad965 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- .../0001-build-wheel-in-place.patch | 31 +++++++++++++++++++ .../python/python3-yarl_1.20.1.bb | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-yarl/0001-build-wheel-in-place.patch