Skip to content

Commit 2d5daab

Browse files
committed
Migrate to esptool v4
Fixes #105
1 parent 31584f6 commit 2d5daab

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

build-on-mac.spec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# -*- mode: python ; coding: utf-8 -*-
22

3+
import os
4+
5+
# We need to add the flasher stub JSON files explicitly: https://github.com/espressif/esptool/issues/1059
6+
venv_python_folder_name = next(d for d in os.listdir('./.venv/lib') if d.startswith('python') and os.path.isdir(os.path.join('./.venv/lib', d)))
7+
local_stub_flasher_path = "./.venv/lib/{}/site-packages/esptool/targets/stub_flasher".format(venv_python_folder_name)
38

49
a = Analysis(
510
['nodemcu-pyflasher.py'],
611
pathex=[],
712
binaries=[],
8-
datas=[("images", "images")],
13+
datas=[
14+
("images", "images"),
15+
("{}/1".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/1"),
16+
("{}/2".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/2")
17+
],
918
hiddenimports=[],
1019
hookspath=[],
1120
hooksconfig={},

build-on-win.spec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# -*- mode: python ; coding: utf-8 -*-
22

3+
# We need to add the flasher stub JSON files explicitly: https://github.com/espressif/esptool/issues/1059
4+
local_stub_flasher_path = "./.venv/Lib/site-packages/esptool/targets/stub_flasher"
35

46
a = Analysis(
57
['nodemcu-pyflasher.py'],
68
pathex=[],
79
binaries=[],
8-
datas=[("images", "images")],
10+
datas=[
11+
("images", "images"),
12+
("{}/1".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/1"),
13+
("{}/2".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/2")
14+
],
915
hiddenimports=[],
1016
hookspath=[],
1117
hooksconfig={},

requirements.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# Can't use v4 atm, see https://github.com/marcelstoer/nodemcu-pyflasher/issues/105
2-
esptool==3.3.3
1+
esptool==4.8.1
32
pyserial~=3.5
4-
# https://github.com/wxWidgets/Phoenix/issues/2499 prevents the use of 4.2.1.
5-
# 4.2.0 requires Python <=3.10 apparently.
6-
wxPython==4.2.0
7-
PyInstaller==6.9.0
3+
wxPython==4.2.2
4+
PyInstaller==6.11.1
85
httplib2>=0.18.1
96
pyinstaller-versionfile>=2.0.0

0 commit comments

Comments
 (0)