@@ -17,15 +17,18 @@ jobs:
1717 run : |
1818 python --version
1919 pip --version
20- - name : Install requirements
20+ - name : Update, Install & Build in virtual python environment
21+ shell : pwsh
2122 run : |
23+ python -m venv .venv
24+ .\.venv\Scripts\Activate.ps1
25+ python -m pip uninstall -y esptool
26+ python -m pip install "esptool>=4.7"
2227 pip install -r requirements_build.txt
2328 pip install -e .
2429 pip install --force-reinstall -v pyinstaller==4.10
2530 pip install --force-reinstall -v pyinstaller-hooks-contrib==2023.2
26- - name : Run PyInstaller
27- run : |
28- python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher\__main__.py
31+ python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico --collect-submodules esptool esphomeflasher\__main__.py
2932 - uses : actions/upload-artifact@master
3033 with :
3134 name : FujiNet-Flasher_win-x64
@@ -45,15 +48,18 @@ jobs:
4548 run : |
4649 python --version
4750 pip --version
48- - name : Install requirements
49- run : |
50- pip install -r requirements_build.txt
51- pip install -e .
52- pip install --force-reinstall -v pyinstaller==4.10
53- pip install --force-reinstall -v pyinstaller-hooks-contrib==2023.2
54- - name : Run PyInstaller
55- run : |
56- python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher\__main__.py
51+ - name: Update, Install & Build in virtual python environment
52+ shell: pwsh
53+ run: |
54+ python -m venv .venv
55+ .\.venv\Scripts\Activate.ps1
56+ python -m pip uninstall -y esptool
57+ python -m pip install "esptool>=4.7"
58+ pip install -r requirements_build.txt
59+ pip install -e .
60+ pip install --force-reinstall -v pyinstaller==4.10
61+ pip install --force-reinstall -v pyinstaller-hooks-contrib==2023.2
62+ python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico --collect-submodules esptool esphomeflasher\__main__.py
5763 - name : See dist directory
5864 run : ls dist
5965 - name : Upload Artifact
8288 pip install -e .
8389 - name : Run PyInstaller
8490 run : |
85- python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher/__main__.py
91+ export STUBS_DIR="$(pip show esptool | grep "Location: " | cut -c 11- | tr -d '\n')/esptool/targets/stub_flasher/"
92+ python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico --add-data="${STUBS_DIR}/1/*.json:esptool/targets/stub_flasher/1/" --add-data="${STUBS_DIR}/2/*.json:esptool/targets/stub_flasher/2/" esphomeflasher/__main__.py
8693 - name : See dist directory
8794 run : ls dist
8895 - name : Upload Artifact
@@ -104,13 +111,18 @@ jobs:
104111 run : |
105112 python --version
106113 pip --version
107- - name : Install requirements
108- run : |
109- pip install -r requirements_build.txt
110- pip install -e .
111- - name : Run PyInstaller
112- run : |
113- python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns esphomeflasher/__main__.py
114+ # Make sure we’re running in an isolated venv
115+ - name : Update, Install & Build in virtual python environment
116+ run : |
117+ python -m venv .venv
118+ source .venv/bin/activate
119+ python -m pip install --upgrade pip
120+ python -m pip uninstall -y esptool || true
121+ python -m pip install "esptool>=4.7"
122+ python -m pip install -r requirements_build.txt
123+ export STUBS_DIR="$(pip show esptool | grep "Location: " | cut -c 11- | tr -d '\n')/esptool/targets/stub_flasher/"
124+ ls -al ${STUBS_DIR}
125+ python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns --add-data="${STUBS_DIR}/1/*.json:esptool/targets/stub_flasher/1/" --add-data="${STUBS_DIR}/2/*.json:esptool/targets/stub_flasher/2/" esphomeflasher/__main__.py
114126 - name : Remove Extra Binary
115127 run : rm dist/FujiNet-Flasher
116128 - name : Set binary permissions
@@ -149,13 +161,17 @@ jobs:
149161 run : |
150162 python3 --version
151163 pip3 --version
152- - name : Install requirements
164+ - name : Update, Install & Build in virtual python environment
153165 run : |
166+ python3 -m venv .venv
167+ source .venv/bin/activate
168+ pip3 install --upgrade pip
169+ pip3 uninstall -y esptool || true
170+ pip3 install "esptool>=4.7"
154171 pip3 install -r requirements_build.txt
155- pip3 install -e .
156- - name : Run PyInstaller
157- run : |
158- python3 -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns esphomeflasher/__main__.py
172+ export STUBS_DIR="$(pip3 show esptool | grep "Location: " | cut -c 11- | tr -d '\n')/esptool/targets/stub_flasher/"
173+ ls -al ${STUBS_DIR}
174+ python3 -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns --add-data="${STUBS_DIR}/1/*.json:esptool/targets/stub_flasher/1/" --add-data="${STUBS_DIR}/2/*.json:esptool/targets/stub_flasher/2/" esphomeflasher/__main__.py
159175 - name : Remove Extra Binary
160176 run : rm dist/FujiNet-Flasher
161177 - name : Set binary permissions
0 commit comments