idf-build-apps 2.9.0__py3-none-any.whl → 2.10.0__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.
- idf_build_apps/__init__.py +1 -1
- idf_build_apps/args.py +3 -4
- idf_build_apps/main.py +14 -2
- {idf_build_apps-2.9.0.dist-info → idf_build_apps-2.10.0.dist-info}/METADATA +1 -1
- {idf_build_apps-2.9.0.dist-info → idf_build_apps-2.10.0.dist-info}/RECORD +8 -8
- {idf_build_apps-2.9.0.dist-info → idf_build_apps-2.10.0.dist-info}/WHEEL +0 -0
- {idf_build_apps-2.9.0.dist-info → idf_build_apps-2.10.0.dist-info}/entry_points.txt +0 -0
- {idf_build_apps-2.9.0.dist-info → idf_build_apps-2.10.0.dist-info}/licenses/LICENSE +0 -0
idf_build_apps/__init__.py
CHANGED
idf_build_apps/args.py
CHANGED
|
@@ -414,10 +414,9 @@ class FindBuildArguments(DependencyDrivenBuildArguments):
|
|
|
414
414
|
default='all', # type: ignore
|
|
415
415
|
)
|
|
416
416
|
build_system: t.Union[str, t.Type[App]] = field(
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
description='Filter the apps by build system. By default set to "cmake"',
|
|
417
|
+
None,
|
|
418
|
+
description='Filter the apps by build system. By default set to "cmake". '
|
|
419
|
+
'Can be either "cmake", "make" or a custom App class path in format "module:class"',
|
|
421
420
|
default='cmake', # type: ignore
|
|
422
421
|
)
|
|
423
422
|
recursive: bool = field(
|
idf_build_apps/main.py
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
6
6
|
import argparse
|
|
7
|
+
import importlib
|
|
7
8
|
import json
|
|
8
9
|
import logging
|
|
9
10
|
import os
|
|
@@ -90,13 +91,24 @@ def find_apps(
|
|
|
90
91
|
|
|
91
92
|
app_cls: t.Type[App]
|
|
92
93
|
if isinstance(find_arguments.build_system, str):
|
|
93
|
-
# backwards compatible
|
|
94
94
|
if find_arguments.build_system == 'cmake':
|
|
95
95
|
app_cls = CMakeApp
|
|
96
96
|
elif find_arguments.build_system == 'make':
|
|
97
97
|
app_cls = MakeApp
|
|
98
|
+
elif ':' in find_arguments.build_system:
|
|
99
|
+
# Custom App class in format "module:class"
|
|
100
|
+
try:
|
|
101
|
+
module_path, class_name = find_arguments.build_system.split(':')
|
|
102
|
+
module = importlib.import_module(module_path)
|
|
103
|
+
app_cls = getattr(module, class_name)
|
|
104
|
+
if not issubclass(app_cls, App):
|
|
105
|
+
raise ValueError(f'Class {class_name} must be a subclass of App')
|
|
106
|
+
except (ValueError, ImportError, AttributeError) as e:
|
|
107
|
+
raise ValueError(f'Invalid custom App class path: {find_arguments.build_system}. Error: {e!s}')
|
|
98
108
|
else:
|
|
99
|
-
raise ValueError(
|
|
109
|
+
raise ValueError(
|
|
110
|
+
'build_system must be either "cmake", "make" or a custom App class path in format "module:class"'
|
|
111
|
+
)
|
|
100
112
|
else:
|
|
101
113
|
app_cls = find_arguments.build_system
|
|
102
114
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
idf_build_apps/__init__.py,sha256=
|
|
1
|
+
idf_build_apps/__init__.py,sha256=Ha5ZrybfsaB7tFsUqXP6HU-k0PWWSR-8MK-OvuOfHQk,651
|
|
2
2
|
idf_build_apps/__main__.py,sha256=pT6OsFQRjCw39Jg43HAeGKzq8h5E_0m7kHDE2QMqDe0,182
|
|
3
3
|
idf_build_apps/app.py,sha256=DKofid9Z0DqoDL1DcsO05rVBtgSd5O9SoCDqKzl8iFQ,36674
|
|
4
|
-
idf_build_apps/args.py,sha256=
|
|
4
|
+
idf_build_apps/args.py,sha256=Nbq5LBRowSFuJ4u4KFqPh7FVGMTHHxLqdH9ZUkCRTOI,35934
|
|
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=wayWyUSCyMvkY72xU-b7IW7I48cv6C-pRqJHMHQsh0c,5794
|
|
8
8
|
idf_build_apps/log.py,sha256=15sSQhv9dJsHShDR2KgFGFp8ByjV0HogLr1X1lHYqGs,3899
|
|
9
|
-
idf_build_apps/main.py,sha256=
|
|
9
|
+
idf_build_apps/main.py,sha256=COudSnUqLEuIGnIVKi06Q4h_McSXwwOpm8aDRGjwnSc,18106
|
|
10
10
|
idf_build_apps/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
idf_build_apps/session_args.py,sha256=yM-78vFzCDCdhXHNxTALmzE4w2NSmka8yVBbh3wtvC8,2985
|
|
12
12
|
idf_build_apps/utils.py,sha256=cQJ5N-53vrASa4d8WW0AQCPJzendArXyU3kB5Vx-AH8,10880
|
|
@@ -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.
|
|
24
|
-
idf_build_apps-2.
|
|
25
|
-
idf_build_apps-2.
|
|
26
|
-
idf_build_apps-2.
|
|
27
|
-
idf_build_apps-2.
|
|
23
|
+
idf_build_apps-2.10.0.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
|
|
24
|
+
idf_build_apps-2.10.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
25
|
+
idf_build_apps-2.10.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
26
|
+
idf_build_apps-2.10.0.dist-info/METADATA,sha256=TilWcEgDYDhf8AKhgjfo5s9X2Hdfhdr6eRnZigvRNQg,4736
|
|
27
|
+
idf_build_apps-2.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|