Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933646 - dev-embedded/esptool-4.7.0-r2 doesn't work
Summary: dev-embedded/esptool-4.7.0-r2 doesn't work
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Martin Dummer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-05 18:44 UTC by Luke-Jr
Modified: 2024-07-02 12:34 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2024-06-05 18:44:04 UTC
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/esptool.py", line 34, in <module>
    import esptool
...repeating
  File "/usr/lib/python-exec/python3.12/esptool.py", line 34, in <module>
    import esptool
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1322, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1262, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1528, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1502, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1635, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1590, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 828, in spec_from_file_location
  File "<frozen importlib._bootstrap_external>", line 187, in _path_abspath
RecursionError: maximum recursion depth exceeded

python3.11 has the same issue.

dev-embedded/esptool-4.6.2 seems to work fine
Comment 1 Karl Hakimian 2024-06-17 01:18:44 UTC
The previous version also works for me. The following also works

python3.12 /usr/bin/esptool.py

So it seems it is the python-exec stuff that is screwed up. I don't know enough about what that is trying to do to debug further.
Comment 2 Martin Dummer 2024-06-17 20:15:03 UTC
I can confirm both reports - executing

esptool.py

ends up with the RecursionError, and


python3.12 /usr/bin/esptool.py

is working.

As I am no real python expert, I seek for help and call back....
Comment 3 Matt Jolly gentoo-dev 2024-07-01 22:36:39 UTC
This package obviously needs to be a single-impl python thing.

My workaround:

```
python3.11 $(which esptool.py) --baud 115200 --port /dev/ttyUSB0 write_flash 0x0 firmware-heltec-v2_1-2.3.13.83f5ba0.bin 
```
Comment 4 Martin Dummer 2024-07-02 12:34:43 UTC
(In reply to Matt Jolly from comment #3)
> This package obviously needs to be a single-impl python thing.
> 


I confirm that re-adding DISTUTILS_SINGLE_IMPL=1 gives the functionality back immediately.

But @flow has removed exactly this in commit f1fac2d9fe with the comment:

    There seems to be no reason why esptool is python single-impl.
    
    Being python single-impl causes issues for consumer of the
    dev-embedded/esptool dependency. For example, dev-embedded/esp-idf (from
    ::guru), currently declares the dev-embedded/esptool dependency without
    [${PYTHON_USEDEP}] as consequence of this.

So there is the question if there is a solution for both options - but I must say that's beyond my personal knowledge.

Python experts, please have an eye on this here!