diff --git a/build-on-mac.spec b/build-on-mac.spec index 73111e8..61d6c73 100644 --- a/build-on-mac.spec +++ b/build-on-mac.spec @@ -1,11 +1,20 @@ # -*- mode: python ; coding: utf-8 -*- +import os + +# We need to add the flasher stub JSON files explicitly: https://github.com/espressif/esptool/issues/1059 +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))) +local_stub_flasher_path = "./.venv/lib/{}/site-packages/esptool/targets/stub_flasher".format(venv_python_folder_name) a = Analysis( ['nodemcu-pyflasher.py'], pathex=[], binaries=[], - datas=[("images", "images")], + datas=[ + ("images", "images"), + ("{}/1".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/1"), + ("{}/2".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/2") + ], hiddenimports=[], hookspath=[], hooksconfig={}, diff --git a/build-on-win.spec b/build-on-win.spec index 6d17b6e..5d3fb79 100644 --- a/build-on-win.spec +++ b/build-on-win.spec @@ -1,11 +1,17 @@ # -*- mode: python ; coding: utf-8 -*- +# We need to add the flasher stub JSON files explicitly: https://github.com/espressif/esptool/issues/1059 +local_stub_flasher_path = "./.venv/Lib/site-packages/esptool/targets/stub_flasher" a = Analysis( ['nodemcu-pyflasher.py'], pathex=[], binaries=[], - datas=[("images", "images")], + datas=[ + ("images", "images"), + ("{}/1".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/1"), + ("{}/2".format(local_stub_flasher_path), "./esptool/targets/stub_flasher/2") + ], hiddenimports=[], hookspath=[], hooksconfig={}, diff --git a/requirements.txt b/requirements.txt index ce5f586..f9c736e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,6 @@ -# Can't use v4 atm, see https://github.com/marcelstoer/nodemcu-pyflasher/issues/105 -esptool==3.3.3 +esptool==4.8.1 pyserial~=3.5 -# https://github.com/wxWidgets/Phoenix/issues/2499 prevents the use of 4.2.1. -# 4.2.0 requires Python <=3.10 apparently. -wxPython==4.2.0 -PyInstaller==6.9.0 +wxPython==4.2.2 +PyInstaller==6.11.1 httplib2>=0.18.1 pyinstaller-versionfile>=2.0.0