idf-build-apps 2.6.1__py3-none-any.whl → 2.6.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ Tools for building ESP-IDF related apps.
8
8
  # ruff: noqa: E402
9
9
  # avoid circular imports
10
10
 
11
- __version__ = '2.6.1'
11
+ __version__ = '2.6.3'
12
12
 
13
13
  from .session_args import (
14
14
  SessionArgs,
idf_build_apps/app.py CHANGED
@@ -1,4 +1,4 @@
1
- # SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
1
+ # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import copy
@@ -127,6 +127,11 @@ class App(BaseModel):
127
127
  __EQ_IGNORE_FIELDS__ = [
128
128
  'build_comment',
129
129
  ]
130
+ __EQ_TUNE_FIELDS__ = {
131
+ 'app_dir': lambda x: (os.path.realpath(os.path.expanduser(x))),
132
+ 'work_dir': lambda x: (os.path.realpath(os.path.expanduser(x))),
133
+ 'build_dir': lambda x: (os.path.realpath(os.path.expanduser(x))),
134
+ }
130
135
 
131
136
  def __init__(
132
137
  self,
idf_build_apps/args.py CHANGED
@@ -323,19 +323,6 @@ class DependencyDrivenBuildArguments(GlobalArguments):
323
323
  root_path=to_absolute_path(self.manifest_rootpath),
324
324
  )
325
325
 
326
- if self.deactivate_dependency_driven_build_by_components is not None:
327
- if self.modified_components is None:
328
- raise InvalidCommand(
329
- 'Must specify --deactivate-dependency-driven-build-by-components '
330
- 'together with --modified-components'
331
- )
332
-
333
- if self.deactivate_dependency_driven_build_by_filepatterns is not None:
334
- if self.modified_files is None:
335
- raise InvalidCommand(
336
- 'Must specify --deactivate-dependency-driven-build-by-filepatterns together with --modified-files'
337
- )
338
-
339
326
  @property
340
327
  def dependency_driven_build_enabled(self) -> bool:
341
328
  """
@@ -450,7 +437,7 @@ class FindBuildArguments(DependencyDrivenBuildArguments):
450
437
  FieldMetadata(
451
438
  deprecates={'size_file': {}},
452
439
  ),
453
- description='`idf.py size` output file under the build directory when specified. ' 'Can expand placeholders',
440
+ description='`idf.py size` output file under the build directory when specified. Can expand placeholders',
454
441
  validation_alias=AliasChoices('size_json_filename', 'size_file'),
455
442
  default=None, # type: ignore
456
443
  )
@@ -654,8 +641,7 @@ class BuildArguments(FindBuildArguments):
654
641
  },
655
642
  nargs='+',
656
643
  ),
657
- description='space-separated list of patterns. '
658
- 'Ignore the warnings in the build output that match the patterns',
644
+ description='space-separated list of patterns. Ignore the warnings in the build output that match the patterns',
659
645
  validation_alias=AliasChoices('ignore_warning_strs', 'ignore_warning_str'),
660
646
  default=None, # type: ignore
661
647
  )
idf_build_apps/main.py CHANGED
@@ -99,7 +99,7 @@ def find_apps(
99
99
  else:
100
100
  app_cls = find_arguments.build_system
101
101
 
102
- apps = []
102
+ apps: t.Set[App] = set()
103
103
  if find_arguments.target == 'all':
104
104
  targets = ALL_TARGETS
105
105
  else:
@@ -107,7 +107,7 @@ def find_apps(
107
107
 
108
108
  for _t in targets:
109
109
  for _p in find_arguments.paths:
110
- apps.extend(
110
+ apps.update(
111
111
  _find_apps(
112
112
  _p,
113
113
  _t,
idf_build_apps/utils.py CHANGED
@@ -1,4 +1,4 @@
1
- # SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
1
+ # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import fnmatch
@@ -340,6 +340,7 @@ class BaseModel(_BaseModel):
340
340
  """
341
341
 
342
342
  __EQ_IGNORE_FIELDS__: t.List[str] = []
343
+ __EQ_TUNE_FIELDS__: t.Dict[str, t.Callable[[t.Any], t.Any]] = {}
343
344
 
344
345
  def __lt__(self, other: t.Any) -> bool:
345
346
  if isinstance(other, self.__class__):
@@ -350,6 +351,10 @@ class BaseModel(_BaseModel):
350
351
  self_attr = getattr(self, k, '') or ''
351
352
  other_attr = getattr(other, k, '') or ''
352
353
 
354
+ if k in self.__EQ_TUNE_FIELDS__:
355
+ self_attr = str(self.__EQ_TUNE_FIELDS__[k](self_attr))
356
+ other_attr = str(self.__EQ_TUNE_FIELDS__[k](other_attr))
357
+
353
358
  if self_attr != other_attr:
354
359
  return self_attr < other_attr
355
360
 
@@ -369,13 +374,22 @@ class BaseModel(_BaseModel):
369
374
  self_model_dump.pop(_field, None)
370
375
  other_model_dump.pop(_field, None)
371
376
 
377
+ for _field in self.__EQ_TUNE_FIELDS__:
378
+ self_model_dump[_field] = self.__EQ_TUNE_FIELDS__[_field](self_model_dump[_field])
379
+ other_model_dump[_field] = self.__EQ_TUNE_FIELDS__[_field](other_model_dump[_field])
380
+
372
381
  return self_model_dump == other_model_dump
373
382
 
374
383
  return NotImplemented
375
384
 
376
385
  def __hash__(self) -> int:
377
386
  hash_list = []
378
- for v in self.model_dump().values():
387
+
388
+ self_model_dump = self.model_dump()
389
+ for _field in self.__EQ_TUNE_FIELDS__:
390
+ self_model_dump[_field] = self.__EQ_TUNE_FIELDS__[_field](self_model_dump[_field])
391
+
392
+ for v in self_model_dump.values():
379
393
  if isinstance(v, list):
380
394
  hash_list.append(tuple(v))
381
395
  elif isinstance(v, dict):
@@ -17,6 +17,7 @@ Modifications:
17
17
  - recursively find TOML file.
18
18
  """
19
19
 
20
+ import logging
20
21
  import os
21
22
  import sys
22
23
  from abc import ABC, abstractmethod
@@ -30,6 +31,7 @@ from idf_build_apps.constants import IDF_BUILD_APPS_TOML_FN
30
31
 
31
32
  PathType = Union[Path, str, List[Union[Path, str]], Tuple[Union[Path, str], ...]]
32
33
  DEFAULT_PATH = Path('')
34
+ LOGGER = logging.getLogger(__name__)
33
35
 
34
36
 
35
37
  class ConfigFileSourceMixin(ABC):
@@ -94,18 +96,18 @@ class TomlConfigSettingsSource(InitSettingsSource, ConfigFileSourceMixin):
94
96
  """
95
97
  if provided and Path(provided).is_file():
96
98
  fp = provided.resolve()
97
- print(f'Loading config file: {fp}')
99
+ LOGGER.debug(f'Loading config file: {fp}')
98
100
  return fp
99
101
 
100
102
  rv = Path.cwd()
101
103
  count = -1
102
104
  while count < depth:
103
- if str(rv) == rv.root:
105
+ if len(rv.parts) == 1:
104
106
  break
105
107
 
106
108
  fp = rv / filename
107
109
  if fp.is_file():
108
- print(f'Loading config file: {fp}')
110
+ LOGGER.debug(f'Loading config file: {fp}')
109
111
  return fp
110
112
 
111
113
  rv = rv.parent
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: idf-build-apps
3
- Version: 2.6.1
3
+ Version: 2.6.3
4
4
  Summary: Tools for building ESP-IDF related apps.
5
5
  Author-email: Fu Hanxi <fuhanxi@espressif.com>
6
6
  Requires-Python: >=3.7
@@ -1,15 +1,15 @@
1
- idf_build_apps/__init__.py,sha256=vUpvuUfhUex6RVt7a3vpSTczJJkHz8qSc2HqbwFW_80,650
1
+ idf_build_apps/__init__.py,sha256=pu5ALHzpC-OiFkmOSVzFLR79PblHzc8HoLeF5NAPeTw,650
2
2
  idf_build_apps/__main__.py,sha256=8E-5xHm2MlRun0L88XJleNh5U50dpE0Q1nK5KqomA7I,182
3
- idf_build_apps/app.py,sha256=F-MKOsaz7cJ0H2wsEE4gpO4kkkEdkyFmIZBHDoM2qgs,37359
4
- idf_build_apps/args.py,sha256=zB08ctBXFz1UkPv4r7kE6E6sBezCFrrzt99HKRDiRTA,34821
3
+ idf_build_apps/app.py,sha256=v85SiN56-yOxxo48owo9JLgL56sQjsR6c5ScBES4wxA,37611
4
+ idf_build_apps/args.py,sha256=rNOzetQYyfCfz9RQq_bzLXL6FrFpJllvLU2VooL_p9s,34178
5
5
  idf_build_apps/autocompletions.py,sha256=g-bx0pzXoFKI0VQqftkHyGVWN6MLjuFOdozeuAf45yo,2138
6
6
  idf_build_apps/constants.py,sha256=HU0rtKqhvLj9nMsy6XvyQMjMEBliNi9xaS2D8CQEPsE,2421
7
7
  idf_build_apps/finder.py,sha256=hY6uSMB2s65MqMKIDBSHABOfa93mOLT7x5hlMxC43EQ,5794
8
8
  idf_build_apps/log.py,sha256=pyvT7N4MWzGjIXph5mThQCGBiSt53RNPW0WrFfLr0Kw,2650
9
- idf_build_apps/main.py,sha256=SZauvC_DNEsl1Twc5xQxHSSPt8sgYsNOZjN4UjHk0gQ,16569
9
+ idf_build_apps/main.py,sha256=mxoGsUN_oTFKlSkerLh1kQwgtiydx23-N8LTHlVZ0MI,16584
10
10
  idf_build_apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  idf_build_apps/session_args.py,sha256=2WDTy40IFAc0KQ57HaeBcYj_k10eUXRKkDOWLrFCaHY,2985
12
- idf_build_apps/utils.py,sha256=s4D8P7QA17XcaCUQ_EoiNOW_VpU3cPQgiZVV9KQ8I30,10171
12
+ idf_build_apps/utils.py,sha256=cQJ5N-53vrASa4d8WW0AQCPJzendArXyU3kB5Vx-AH8,10880
13
13
  idf_build_apps/junit/__init__.py,sha256=IxvdaS6eSXp7kZxRuXqyZyGxuA_A1nOW1jF1HMi8Gns,231
14
14
  idf_build_apps/junit/report.py,sha256=T7dVU3Sz5tqjfbcFW7wjsb65PDH6C2HFf73ePJqBhMs,6555
15
15
  idf_build_apps/junit/utils.py,sha256=NXZxQD4tdbSVKjKMNx1kO2H3IoEiysXkDoDjLEf1RO8,1303
@@ -17,11 +17,11 @@ idf_build_apps/manifest/__init__.py,sha256=LYGR9doEKGPEdsJPuHnmJmV-qw2kuAipV0bod
17
17
  idf_build_apps/manifest/manifest.py,sha256=5BIzNzGAk0w5qOCTMGsmvKcN4DQLwUi6JVGt2G4JKQs,14793
18
18
  idf_build_apps/manifest/soc_header.py,sha256=_F6H5-HP6ateAqKUGlRGH-SUtQ8NJ1RI0hBeCFvsDYA,172
19
19
  idf_build_apps/vendors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- idf_build_apps/vendors/pydantic_sources.py,sha256=cO316vq4wAw51O1-KsYz8jrhiI_lkCghiPCYyH0Ghik,4487
20
+ idf_build_apps/vendors/pydantic_sources.py,sha256=cxSIPRc3eI5peVMhDxwf58YaGhuG4SCwPRVX2znFEek,4553
21
21
  idf_build_apps/yaml/__init__.py,sha256=W-3z5no07RQ6eYKGyOAPA8Z2CLiMPob8DD91I4URjrA,162
22
22
  idf_build_apps/yaml/parser.py,sha256=b3LvogO6do-eJPRsYzT-8xk8AT2MnXpLCzQutJqyC7M,2128
23
- idf_build_apps-2.6.1.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
24
- idf_build_apps-2.6.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
25
- idf_build_apps-2.6.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
26
- idf_build_apps-2.6.1.dist-info/METADATA,sha256=z7cnY1oC-PXymCxVYo7_Ao5LvPnFyzblDYVE_sUavbI,4693
27
- idf_build_apps-2.6.1.dist-info/RECORD,,
23
+ idf_build_apps-2.6.3.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
24
+ idf_build_apps-2.6.3.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
25
+ idf_build_apps-2.6.3.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
26
+ idf_build_apps-2.6.3.dist-info/METADATA,sha256=vGpCumQY2Eltveo01rFfuwt5QKrE4S4r_6KpcYh51QE,4693
27
+ idf_build_apps-2.6.3.dist-info/RECORD,,