[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] [PATCH] devtool: unset _PYTHON_SYSCONFIGDATA_NAME
From: "Alexander Kanavin" <alex.kanavin () gmail ! com>
Date: 2020-08-31 20:06:02
Message-ID: CANNYZj9FTytpu2OWg9DKODX0UmAuucHh0tNuekaXrthxoS2Abg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I just ran this on opensuse tumbleweed which has 3.8.5 - no issues.
Alex
On Mon, 31 Aug 2020 at 21:55, gr embeter <grembeter@gmail.com> wrote:
> Hi
>
> > On Thu, Aug 27, 2020 at 4:59 PM Alexander Kanavin <
> alex.kanavin@gmail.com> wrote:
>
> > Note that we already had the same patch proposed earlier and it was
> rejected, as the problem
> > pops up in various different places and needs to be understood and
> solved properly.
>
> I did not find any patches for devtool. The patch for python3-native
> wrapper does not look "the same".
>
> Does anyone else experience the same issue with devtool?
>
> >
> > > Alex
> > >
> > > On Thu, 27 Aug 2020 at 15:11, gr embeter <grembeter@gmail.com> wrote:
> > >>
> > >> On Ubuntu 20.04.1 LTS with Python 3.8.2 "devtool modify" fails with
> > >> Exception: ModuleNotFoundError: No module named '_sysconfigdata'
> > >>
> > >> e.g.: devtool modify --no-same-dir --branch fit u-boot
> ~/ws/w/dtool/u-boot-fit
> > >>
> > >> ERROR: Error executing a python function in exec_python_func()
> autogenerated:
> > >>
> > >> The stack trace of python calls that resulted in this
> exception/failure was:
> > >> File: 'exec_python_func() autogenerated', lineno: 2, function:
> <module>
> > >> 0001:
> > >> *** 0002:devtool_post_unpack(d)
> > >> 0003:
> > >> [...]
> > >> File: '/usr/lib/python3.8/sysconfig.py', lineno: 421, function:
> _init_posix
> > >> 0417:def _init_posix(vars):
> > >> 0418: """Initialize the module as appropriate for POSIX
> systems."""
> > >> 0419: # _sysconfigdata is generated at build time, see
> _generate_posix_vars()
> > >> 0420: name = _get_sysconfigdata_name()
> > >> *** 0421: _temp = __import__(name, globals(), locals(),
> ['build_time_vars'], 0)
> > >> 0422: build_time_vars = _temp.build_time_vars
> > >> 0423: vars.update(build_time_vars)
> > >> 0424:
> > >> 0425:def _init_non_posix(vars):
> > >> Exception: ModuleNotFoundError: No module named '_sysconfigdata'
> > >>
> > >> It happens because u-boot (and likely other recipes) eventually
> inherits
> > >> python3native.bbclass that sets
> _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
> > >> and this affects host Python.
> > >>
> > >> Hence, unset _PYTHON_SYSCONFIGDATA_NAME for devtool completely.
> > >>
> > >> Signed-off-by: Grygorii Tertychnyi <
> grygorii.tertychnyi@leica-geosystems.com>
> > >> ---
> > >> meta/classes/devtool-source.bbclass | 2 ++
> > >> 1 file changed, 2 insertions(+)
> > >>
> > >> diff --git a/meta/classes/devtool-source.bbclass
> b/meta/classes/devtool-source.bbclass
> > >> index 280d6009f3c2..95d6fe7a29e8 100644
> > >> --- a/meta/classes/devtool-source.bbclass
> > >> +++ b/meta/classes/devtool-source.bbclass
> > >> @@ -22,6 +22,8 @@
> > >> DEVTOOL_TEMPDIR ?= ""
> > >> DEVTOOL_PATCH_SRCDIR = "${DEVTOOL_TEMPDIR}/patchworkdir"
> > >>
> > >> +# host Python fails to import correct _sysconfigdata if this
> variable is set
> > >> +_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1"
> > >>
> > >> python() {
> > >> tempdir = d.getVar('DEVTOOL_TEMPDIR')
> > >> --
> > >> 2.25.1
>
[Attachment #5 (text/html)]
<div dir="ltr"><div>I just ran this on opensuse tumbleweed which has 3.8.5 - no \
issues.</div><div><br></div><div>Alex<br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 31 Aug 2020 at 21:55, \
gr embeter <<a href="mailto:grembeter@gmail.com">grembeter@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br> <br>
> On Thu, Aug 27, 2020 at 4:59 PM Alexander Kanavin <<a \
href="mailto:alex.kanavin@gmail.com" target="_blank">alex.kanavin@gmail.com</a>> \
wrote:<br> <br>
> Note that we already had the same patch proposed earlier and it was rejected, as \
the problem<br> > pops up in various different places and needs to be understood \
and solved properly.<br> <br>
I did not find any patches for devtool. The patch for python3-native<br>
wrapper does not look "the same".<br>
<br>
Does anyone else experience the same issue with devtool?<br>
<br>
><br>
> > Alex<br>
> ><br>
> > On Thu, 27 Aug 2020 at 15:11, gr embeter <<a \
href="mailto:grembeter@gmail.com" target="_blank">grembeter@gmail.com</a>> \
wrote:<br> > >><br>
> >> On Ubuntu 20.04.1 LTS with Python 3.8.2 "devtool modify" \
fails with<br> > >> Exception: ModuleNotFoundError: No module named \
'_sysconfigdata'<br> > >><br>
> >> e.g.: devtool modify --no-same-dir --branch fit u-boot \
~/ws/w/dtool/u-boot-fit<br> > >><br>
> >> ERROR: Error executing a python function in exec_python_func() \
autogenerated:<br> > >><br>
> >> The stack trace of python calls that resulted in this exception/failure \
was:<br> > >> File: 'exec_python_func() autogenerated', lineno: 2, \
function: <module><br> > >> 0001:<br>
> >> *** 0002:devtool_post_unpack(d)<br>
> >> 0003:<br>
> >> [...]<br>
> >> File: '/usr/lib/python3.8/sysconfig.py', lineno: 421, function: \
_init_posix<br> > >> 0417:def _init_posix(vars):<br>
> >> 0418: """Initialize the module as \
appropriate for POSIX systems."""<br> > >> 0419: \
# _sysconfigdata is generated at build time, see _generate_posix_vars()<br> > \
>> 0420: name = _get_sysconfigdata_name()<br> > >> *** \
0421: _temp = __import__(name, globals(), locals(), ['build_time_vars'], \
0)<br> > >> 0422: build_time_vars = _temp.build_time_vars<br>
> >> 0423: vars.update(build_time_vars)<br>
> >> 0424:<br>
> >> 0425:def _init_non_posix(vars):<br>
> >> Exception: ModuleNotFoundError: No module named \
'_sysconfigdata'<br> > >><br>
> >> It happens because u-boot (and likely other recipes) eventually \
inherits<br> > >> python3native.bbclass that sets \
_PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"<br> > >> and this \
affects host Python.<br> > >><br>
> >> Hence, unset _PYTHON_SYSCONFIGDATA_NAME for devtool completely.<br>
> >><br>
> >> Signed-off-by: Grygorii Tertychnyi <<a \
href="mailto:grygorii.tertychnyi@leica-geosystems.com" \
target="_blank">grygorii.tertychnyi@leica-geosystems.com</a>><br> > >> \
---<br> > >> meta/classes/devtool-source.bbclass | 2 ++<br>
> >> 1 file changed, 2 insertions(+)<br>
> >><br>
> >> diff --git a/meta/classes/devtool-source.bbclass \
b/meta/classes/devtool-source.bbclass<br> > >> index \
280d6009f3c2..95d6fe7a29e8 100644<br> > >> --- \
a/meta/classes/devtool-source.bbclass<br> > >> +++ \
b/meta/classes/devtool-source.bbclass<br> > >> @@ -22,6 +22,8 @@<br>
> >> DEVTOOL_TEMPDIR ?= ""<br>
> >> DEVTOOL_PATCH_SRCDIR = \
"${DEVTOOL_TEMPDIR}/patchworkdir"<br> > >><br>
> >> +# host Python fails to import correct _sysconfigdata if this variable \
is set<br> > >> +_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1"<br>
> >><br>
> >> python() {<br>
> >> tempdir = d.getVar('DEVTOOL_TEMPDIR')<br>
> >> --<br>
> >> 2.25.1<br>
</blockquote></div>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#142035): https://lists.openembedded.org/g/openembedded-core/message/142035
Mute This Topic: https://lists.openembedded.org/mt/76450895/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic