49
49
# Python dependencies required for the build process
50
50
python_deps = {
51
51
"uv" : ">=0.1.0" ,
52
+ "platformio" : ">=6.1.18" ,
52
53
"pyyaml" : ">=6.0.2" ,
53
54
"rich-click" : ">=1.8.6" ,
54
55
"zopfli" : ">=0.2.2" ,
@@ -179,8 +180,7 @@ def install_python_deps():
179
180
[PYTHON_EXE , "-m" , "pip" , "install" , "uv>=0.1.0" , "-q" , "-q" , "-q" ],
180
181
capture_output = True ,
181
182
text = True ,
182
- timeout = 30 , # 30 second timeout
183
- env = os .environ # Use current environment with venv Python
183
+ timeout = 30 # 30 second timeout
184
184
)
185
185
if result .returncode != 0 :
186
186
if result .stderr :
@@ -200,21 +200,20 @@ def install_python_deps():
200
200
201
201
def _get_installed_uv_packages ():
202
202
"""
203
- Get list of installed packages using uv.
203
+ Get list of installed packages in virtual env 'penv' using uv.
204
204
205
205
Returns:
206
206
dict: Dictionary of installed packages with versions
207
207
"""
208
208
result = {}
209
209
try :
210
- cmd = [uv_executable , "pip" , "list" , "--format=json" ]
210
+ cmd = [uv_executable , "pip" , "list" , f"--python= { PYTHON_EXE } " , "--format=json" ]
211
211
result_obj = subprocess .run (
212
212
cmd ,
213
213
capture_output = True ,
214
214
text = True ,
215
215
encoding = 'utf-8' ,
216
- timeout = 30 , # 30 second timeout
217
- env = os .environ # Use current environment with venv Python
216
+ timeout = 30 # 30 second timeout
218
217
)
219
218
220
219
if result_obj .returncode == 0 :
@@ -256,8 +255,7 @@ def _get_installed_uv_packages():
256
255
cmd ,
257
256
capture_output = True ,
258
257
text = True ,
259
- timeout = 30 , # 30 second timeout for package installation
260
- env = os .environ # Use current environment with venv Python
258
+ timeout = 30 # 30 second timeout for package installation
261
259
)
262
260
263
261
if result .returncode != 0 :
@@ -290,8 +288,7 @@ def install_esptool():
290
288
subprocess .check_call (
291
289
[PYTHON_EXE , "-c" , "import esptool" ],
292
290
stdout = subprocess .DEVNULL ,
293
- stderr = subprocess .DEVNULL ,
294
- env = os .environ
291
+ stderr = subprocess .DEVNULL
295
292
)
296
293
return
297
294
except (subprocess .CalledProcessError , FileNotFoundError ):
@@ -307,7 +304,7 @@ def install_esptool():
307
304
uv_executable , "pip" , "install" , "--quiet" ,
308
305
f"--python={ PYTHON_EXE } " ,
309
306
"-e" , esptool_repo_path
310
- ], env = os . environ )
307
+ ])
311
308
312
309
return
313
310
0 commit comments