idf-build-apps 2.13.0__py3-none-any.whl → 2.13.2__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.13.0'
11
+ __version__ = '2.13.2'
12
12
 
13
13
  from .session_args import (
14
14
  SessionArgs,
idf_build_apps/app.py CHANGED
@@ -642,11 +642,28 @@ class App(BaseModel):
642
642
  return
643
643
 
644
644
  if IDF_VERSION >= Version('4.1'):
645
+ """
646
+ Starting from version 2.0.0 esp-idf-size uses new generation (NG) implementation.
647
+ In newest version `--format json` was changed to `--format json2`.
648
+ For different versions of IDF there are 4 scenarios:
649
+
650
+ 1. 6.0 - NG is enforced until version 2.x will be fully incorporated.
651
+ 2. >=5.3 <=5.5 - NG is enabled by default, but could be disabled using `-l/--legacy` argument.
652
+ 3. 5.1 and 5.2 - only legacy mode is supported.
653
+ 4. <5.1 - esp-idf-size package is not used, only `--json` argument is supported.
654
+ """
655
+ if IDF_VERSION >= Version('5.3'):
656
+ format_arg = ['--format', 'json2']
657
+ elif IDF_VERSION >= Version('5.1'):
658
+ format_arg = ['--format', 'json']
659
+ else:
660
+ format_arg = ['--json']
661
+
645
662
  subprocess_run(
646
663
  [
647
664
  sys.executable,
648
665
  str(IDF_SIZE_PY),
649
- *(['--json'] if IDF_VERSION < Version('5.1') else ['--format', 'json']),
666
+ *(format_arg),
650
667
  '-o',
651
668
  self.size_json_path,
652
669
  *(self.size_json_extra_args or []),
@@ -709,8 +726,12 @@ class App(BaseModel):
709
726
  if os.path.basename(_f_fullpath).endswith('.md'):
710
727
  continue
711
728
 
712
- if _f_fullpath.startswith(_app_dir_fullpath):
713
- return True
729
+ try:
730
+ if os.path.commonpath([_f_fullpath, _app_dir_fullpath]) == _app_dir_fullpath:
731
+ return True
732
+ except ValueError:
733
+ # on Windows, if paths are on different drives, a ValueError will be raised
734
+ continue
714
735
 
715
736
  return False
716
737
 
idf_build_apps/args.py CHANGED
@@ -145,6 +145,7 @@ class BaseArguments(BaseSettings):
145
145
  # these below two are supported in pydantic 2.6
146
146
  pyproject_toml_table_header=('tool', 'idf-build-apps'),
147
147
  pyproject_toml_depth=sys.maxsize,
148
+ validate_default=True,
148
149
  extra='ignore', # we're supporting pydantic <2.6 as well, so we ignore extra fields
149
150
  )
150
151
 
idf_build_apps/main.py CHANGED
@@ -396,6 +396,9 @@ def main():
396
396
  Manifest.from_files(arguments.manifest_files).dump_sha_values(arguments.output)
397
397
  sys.exit(0)
398
398
  elif action == 'find':
399
+ print('reinstall idf-build-apps')
400
+ print(kwargs['paths'])
401
+
399
402
  arguments = FindArguments(**drop_none_kwargs(kwargs))
400
403
  else:
401
404
  arguments = BuildArguments(**drop_none_kwargs(kwargs))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: idf-build-apps
3
- Version: 2.13.0
3
+ Version: 2.13.2
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,12 +1,12 @@
1
- idf_build_apps/__init__.py,sha256=NMlLrPIwkNau5FvVguRJyW_C8qIaidZce8hpmlQXkhE,711
1
+ idf_build_apps/__init__.py,sha256=E0n56IiCyZFns3uVrkkIGeCv1hE9surybp-xb5vQlLE,711
2
2
  idf_build_apps/__main__.py,sha256=pT6OsFQRjCw39Jg43HAeGKzq8h5E_0m7kHDE2QMqDe0,182
3
- idf_build_apps/app.py,sha256=9TeFeQnvqETtmLV9v3mQzXmkJA1F3e8l_16MkCRhBT4,39149
4
- idf_build_apps/args.py,sha256=e9d4kxv2q7SEOF42rWn-GS9EfIYYLaMxNUagJ8SPGzk,40140
3
+ idf_build_apps/app.py,sha256=iMu2m20O7vMpHWWQv107pjtqIJXMT-0Je3uWeWznfog,40179
4
+ idf_build_apps/args.py,sha256=Kf14fvk07qsZYYpJqROMimA8w7YlVqOxjr21W88FZJ8,40171
5
5
  idf_build_apps/autocompletions.py,sha256=2fZQxzgZ21ie_2uk-B-7-xWYCChfOSgRFRYb7I2Onfo,2143
6
6
  idf_build_apps/constants.py,sha256=2iwLPZRhSQcn1v4RAcOJnHbqp1fDTp6A1gHaxn5ciTE,2166
7
7
  idf_build_apps/finder.py,sha256=CKppfxa-nPedHKXfyQ841q1DZc0BimVulXK52EfCD0o,5833
8
8
  idf_build_apps/log.py,sha256=15sSQhv9dJsHShDR2KgFGFp8ByjV0HogLr1X1lHYqGs,3899
9
- idf_build_apps/main.py,sha256=P_TsUA2s048qcRb-wVngF-zqNjH_NEYrQsAYKB1GHmU,17960
9
+ idf_build_apps/main.py,sha256=okfGrChI2i4Vzeag_dRKD5QaxlpAJ2rZ-MFcIS2PzXk,18034
10
10
  idf_build_apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  idf_build_apps/session_args.py,sha256=1B7e3M9_eKdQezGNXaocqCq7iE4MOxpYJkfanCfdkDE,2973
12
12
  idf_build_apps/utils.py,sha256=YJZOXIpo3aoRkGZJoQUJHAPWi2VkTDAVzQG5DI2igxw,10976
@@ -20,8 +20,8 @@ idf_build_apps/vendors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
20
20
  idf_build_apps/vendors/pydantic_sources.py,sha256=cxSIPRc3eI5peVMhDxwf58YaGhuG4SCwPRVX2znFEek,4553
21
21
  idf_build_apps/yaml/__init__.py,sha256=R6pYasVsD31maeZ4dWRZnS10hwzM7gXdnfzDsOIRJ-4,167
22
22
  idf_build_apps/yaml/parser.py,sha256=IhY7rCWXOxrzzgEiKipTdPs_8yXDf8JZr-sMewV1pk8,2133
23
- idf_build_apps-2.13.0.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
24
- idf_build_apps-2.13.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
25
- idf_build_apps-2.13.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
26
- idf_build_apps-2.13.0.dist-info/METADATA,sha256=yMOaaLlxZVkHHPhQjVHnaQRCtE4z0uTb_3DzIpTovFc,4795
27
- idf_build_apps-2.13.0.dist-info/RECORD,,
23
+ idf_build_apps-2.13.2.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
24
+ idf_build_apps-2.13.2.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
25
+ idf_build_apps-2.13.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
26
+ idf_build_apps-2.13.2.dist-info/METADATA,sha256=ELm5hM4bEZkyG9lwiiXAQBCtuE_PySR3qz0mtR0GukE,4795
27
+ idf_build_apps-2.13.2.dist-info/RECORD,,