4949# Python dependencies required for the build process
5050python_deps = {
5151 "uv" : ">=0.1.0" ,
52+ "platformio" : ">=6.1.18" ,
5253 "pyyaml" : ">=6.0.2" ,
5354 "rich-click" : ">=1.8.6" ,
5455 "zopfli" : ">=0.2.2" ,
@@ -179,8 +180,7 @@ def install_python_deps():
179180 [PYTHON_EXE , "-m" , "pip" , "install" , "uv>=0.1.0" , "-q" , "-q" , "-q" ],
180181 capture_output = True ,
181182 text = True ,
182- timeout = 30 , # 30 second timeout
183- env = os .environ # Use current environment with venv Python
183+ timeout = 30 # 30 second timeout
184184 )
185185 if result .returncode != 0 :
186186 if result .stderr :
@@ -200,21 +200,20 @@ def install_python_deps():
200200
201201 def _get_installed_uv_packages ():
202202 """
203- Get list of installed packages using uv.
203+ Get list of installed packages in virtual env 'penv' using uv.
204204
205205 Returns:
206206 dict: Dictionary of installed packages with versions
207207 """
208208 result = {}
209209 try :
210- cmd = [uv_executable , "pip" , "list" , "--format=json" ]
210+ cmd = [uv_executable , "pip" , "list" , f"--python= { PYTHON_EXE } " , "--format=json" ]
211211 result_obj = subprocess .run (
212212 cmd ,
213213 capture_output = True ,
214214 text = True ,
215215 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
218217 )
219218
220219 if result_obj .returncode == 0 :
@@ -256,8 +255,7 @@ def _get_installed_uv_packages():
256255 cmd ,
257256 capture_output = True ,
258257 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
261259 )
262260
263261 if result .returncode != 0 :
@@ -290,8 +288,7 @@ def install_esptool():
290288 subprocess .check_call (
291289 [PYTHON_EXE , "-c" , "import esptool" ],
292290 stdout = subprocess .DEVNULL ,
293- stderr = subprocess .DEVNULL ,
294- env = os .environ
291+ stderr = subprocess .DEVNULL
295292 )
296293 return
297294 except (subprocess .CalledProcessError , FileNotFoundError ):
@@ -307,7 +304,7 @@ def install_esptool():
307304 uv_executable , "pip" , "install" , "--quiet" ,
308305 f"--python={ PYTHON_EXE } " ,
309306 "-e" , esptool_repo_path
310- ], env = os . environ )
307+ ])
311308
312309 return
313310
0 commit comments