On Mon, 2021-11-08 at 14:55 +0800, Yi Zhao wrote:
> Setuptools has removed support for 2to3 during builds since version
> 58[1]. But the nose's setup.py relies on use_2to3 option in setuptools,
> it is failing an import and building without running 2to3 and generating
> valid python3 code. As a workaround, we use command line 2to3 tool to
> translate to Python3 code before build it.
> 
> Fixes:
> $ python3
> > > > import nose
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python3.10/site-packages/nose/_init_.py", line 1, in <module>
> from nose.core import collector, main, run, run_exit, runmodule
> File "/usr/lib/python3.10/site-packages/nose/core.py", line 153
> print "%s version %s" % (os.path.basename(sys.argv[0]), _version_)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
> > > > 
> 
> [1] https://github.com/pypa/setuptools/issues/2086
> 
> Signed-off-by: Yi Zhao <[email protected]>
> ---
>  meta/recipes-devtools/python/python-nose.inc  |  6 ++
>  .../python3-nose/0001-Remove-use_2to3.patch   | 71 +++++++++++++++++++
>  2 files changed, 77 insertions(+)
>  create mode 100644 
> meta/recipes-devtools/python/python3-nose/0001-Remove-use_2to3.patch

This failed in testing unfortunately:

https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/4323/steps/14/logs/stdio

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157989): 
https://lists.openembedded.org/g/openembedded-core/message/157989
Mute This Topic: https://lists.openembedded.org/mt/86900770/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to