idf-build-apps 2.5.2__tar.gz → 2.5.3__tar.gz
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.
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/CHANGELOG.md +6 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/PKG-INFO +1 -1
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/__init__.py +1 -1
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/args.py +21 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/pyproject.toml +1 -1
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/setup.py +1 -1
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_cmd.py +29 -1
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.editorconfig +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.git-blame-ignore-revs +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.gitattributes +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/dependabot.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/check-pre-commit.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/issue_comment.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/new_issues.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/new_prs.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/publish-pypi.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/test-build-docs.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.github/workflows/test-build-idf-apps.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.gitignore +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.pre-commit-config.yaml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/.readthedocs.yml +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/CONTRIBUTING.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/LICENSE +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/README.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_apidoc_templates/module.rst_t +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_apidoc_templates/package.rst_t +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_apidoc_templates/toc.rst_t +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_static/espressif-logo.svg +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_static/theme_overrides.css +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/_templates/layout.html +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/conf_common.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/Makefile +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/conf.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/explanations/build.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/explanations/config_rules.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/explanations/dependency_driven_build.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/explanations/find.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/guides/1.x_to_2.x.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/index.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/others/CHANGELOG.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/others/CONTRIBUTING.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/references/cli.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/references/config_file.md +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/references/manifest.rst +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/__main__.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/app.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/autocompletions.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/constants.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/finder.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/junit/__init__.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/junit/report.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/junit/utils.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/log.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/main.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/manifest/__init__.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/manifest/if_parser.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/manifest/manifest.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/manifest/soc_header.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/session_args.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/utils.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/vendors/__init__.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/vendors/pydantic_sources.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/yaml/__init__.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/idf_build_apps/yaml/parser.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/license_header.txt +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/conftest.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_app.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_args.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_build.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_finder.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_manifest.py +0 -0
- {idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/tests/test_utils.py +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import argparse
|
|
5
5
|
import enum
|
|
6
|
+
import glob
|
|
6
7
|
import inspect
|
|
7
8
|
import logging
|
|
8
9
|
import os
|
|
@@ -191,6 +192,15 @@ class DependencyDrivenBuildArguments(GlobalArguments):
|
|
|
191
192
|
validation_alias=AliasChoices('manifest_files', 'manifest_file'),
|
|
192
193
|
default=None,
|
|
193
194
|
)
|
|
195
|
+
manifest_filepatterns: t.Optional[t.List[str]] = field(
|
|
196
|
+
FieldMetadata(
|
|
197
|
+
validate_method=[ValidateMethod.TO_LIST],
|
|
198
|
+
nargs='+',
|
|
199
|
+
),
|
|
200
|
+
description='space-separated list of file patterns to search for the manifest files. '
|
|
201
|
+
'The matched files will be loaded as the manifest files.',
|
|
202
|
+
default=None,
|
|
203
|
+
)
|
|
194
204
|
manifest_rootpath: str = field(
|
|
195
205
|
None,
|
|
196
206
|
description='Root path to resolve the relative paths defined in the manifest files. '
|
|
@@ -279,6 +289,17 @@ class DependencyDrivenBuildArguments(GlobalArguments):
|
|
|
279
289
|
def model_post_init(self, __context: Any) -> None:
|
|
280
290
|
super().model_post_init(__context)
|
|
281
291
|
|
|
292
|
+
if self.manifest_filepatterns:
|
|
293
|
+
matched_paths = set()
|
|
294
|
+
for pat in [to_absolute_path(p, self.manifest_rootpath) for p in self.manifest_filepatterns]:
|
|
295
|
+
matched_paths.update(glob.glob(str(pat), recursive=True))
|
|
296
|
+
|
|
297
|
+
if matched_paths:
|
|
298
|
+
if self.manifest_files:
|
|
299
|
+
self.manifest_files.extend(matched_paths)
|
|
300
|
+
else:
|
|
301
|
+
self.manifest_files = list(matched_paths)
|
|
302
|
+
|
|
282
303
|
Manifest.CHECK_MANIFEST_RULES = self.check_manifest_rules
|
|
283
304
|
if self.manifest_files:
|
|
284
305
|
App.MANIFEST = Manifest.from_files(
|
|
@@ -35,7 +35,7 @@ entry_points = \
|
|
|
35
35
|
{'console_scripts': ['idf-build-apps = idf_build_apps:main.main']}
|
|
36
36
|
|
|
37
37
|
setup(name='idf-build-apps',
|
|
38
|
-
version='2.5.
|
|
38
|
+
version='2.5.3',
|
|
39
39
|
description='Tools for building ESP-IDF related apps.',
|
|
40
40
|
author=None,
|
|
41
41
|
author_email='Fu Hanxi <fuhanxi@espressif.com>',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
3
|
+
import os
|
|
4
4
|
import sys
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
@@ -67,3 +67,31 @@ foobar:
|
|
|
67
67
|
f'foo:{sha_of_enable_only_esp32}\n'
|
|
68
68
|
f'foobar:{sha_of_enable_esp32_or_esp32s2}\n'
|
|
69
69
|
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def test_manifest_patterns(tmp_path, monkeypatch, capsys):
|
|
73
|
+
manifest = tmp_path / 'manifest.yml'
|
|
74
|
+
manifest.write_text(
|
|
75
|
+
"""foo:
|
|
76
|
+
enable:
|
|
77
|
+
- if: IDF_TARGET == "esp32"
|
|
78
|
+
bar:
|
|
79
|
+
enable:
|
|
80
|
+
- if: IDF_TARGET == "esp32"
|
|
81
|
+
"""
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
with pytest.raises(SystemExit) as e:
|
|
85
|
+
with monkeypatch.context() as m:
|
|
86
|
+
m.setattr(
|
|
87
|
+
sys,
|
|
88
|
+
'argv',
|
|
89
|
+
['idf-build-apps', 'find', '--manifest-filepatterns', '**.whatever', '**/manifest.yml', '-vv'],
|
|
90
|
+
)
|
|
91
|
+
main()
|
|
92
|
+
assert e.retcode == 0
|
|
93
|
+
|
|
94
|
+
_, err = capsys.readouterr()
|
|
95
|
+
assert f'Loading manifest file {os.path.join(tmp_path, "manifest.yml")}' in err
|
|
96
|
+
assert f'"{os.path.join(tmp_path, "foo")}" does not exist' in err
|
|
97
|
+
assert f'"{os.path.join(tmp_path, "bar")}" does not exist' in err
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{idf_build_apps-2.5.2 → idf_build_apps-2.5.3}/docs/en/explanations/dependency_driven_build.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|