idf-build-apps 1.0.0rc0__py2.py3-none-any.whl → 1.0.1__py2.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.
@@ -7,7 +7,7 @@ Tools for building ESP-IDF related apps.
7
7
 
8
8
  import logging
9
9
 
10
- __version__ = '1.0.0.rc0'
10
+ __version__ = '1.0.1'
11
11
 
12
12
  LOGGER = logging.getLogger('idf_build_apps')
13
13
 
idf_build_apps/finder.py CHANGED
@@ -17,6 +17,7 @@ from .app import (
17
17
  )
18
18
  from .utils import (
19
19
  config_rules_from_str,
20
+ to_absolute_path,
20
21
  to_list,
21
22
  )
22
23
 
@@ -165,15 +166,18 @@ def _find_apps(
165
166
 
166
167
  # The remaining part is for recursive == True
167
168
  apps = []
169
+ # handle the exclude list, since the config file might use linux style, but run in windows
170
+ exclude_list = [to_absolute_path(p) for p in exclude_list]
168
171
  for root, dirs, _ in os.walk(path):
169
172
  LOGGER.debug('Entering %s', root)
170
- if root in exclude_list:
173
+ root_path = to_absolute_path(root)
174
+ if root_path in exclude_list:
171
175
  LOGGER.debug('=> Skipping %s (excluded)', root)
172
176
  del dirs[:]
173
177
  continue
174
178
 
175
- if root.endswith('managed_components'): # idf-component-manager
176
- LOGGER.debug('=> Skipping %s (managed components)', root)
179
+ if root_path.parts[-1] == 'managed_components': # idf-component-manager
180
+ LOGGER.debug('=> Skipping %s (managed components)', root_path)
177
181
  del dirs[:]
178
182
  continue
179
183
 
idf_build_apps/main.py CHANGED
@@ -498,11 +498,7 @@ def get_parser(): # type: () -> argparse.ArgumentParser
498
498
  action='store_true',
499
499
  help='Look for apps in the specified paths recursively',
500
500
  )
501
- common_args.add_argument(
502
- '--exclude',
503
- nargs='+',
504
- help='Ignore specified directory (if --recursive is given)',
505
- )
501
+ common_args.add_argument('--exclude', nargs='+', help='Ignore specified path (if --recursive is given)')
506
502
  common_args.add_argument(
507
503
  '--work-dir',
508
504
  help='If set, the app is first copied into the specified directory, and then built. '
@@ -588,10 +584,9 @@ def get_parser(): # type: () -> argparse.ArgumentParser
588
584
  '--ignore-app-dependencies-filepatterns',
589
585
  nargs='*',
590
586
  default=None,
591
- help='space-separated list which specifies the file patterns used for ignoring the component dependencies. '
592
- 'The `depends_components` and `depends_filepatterns` set in the manifest files will be ignored when any of '
593
- 'the specified file patterns matches any of the modified files. Must be used together with '
594
- '--modified-files',
587
+ help='space-separated list which specifies the file patterns used for ignoring checking the app dependencies. '
588
+ 'The `depends_components` and `depends_filepatterns` set in the manifest files will be ignored when any of the '
589
+ 'specified file patterns matches any of the modified files. Must be used together with --modified-files',
595
590
  )
596
591
 
597
592
  common_args.add_argument(
idf_build_apps/utils.py CHANGED
@@ -23,6 +23,12 @@ except ImportError:
23
23
  pass
24
24
 
25
25
 
26
+ if sys.version_info < (3, 5):
27
+ import glob2 as glob
28
+ else:
29
+ import glob
30
+
31
+
26
32
  class ConfigRule:
27
33
  def __init__(self, file_name, config_name): # type: (str, str) -> None
28
34
  """
@@ -213,14 +219,17 @@ def files_matches_patterns(
213
219
  patterns, # type: list[str] | str
214
220
  rootpath=None, # type: str
215
221
  ): # type: (...) -> bool
216
- # can't match a absolute pattern with a relative path
222
+ # can't match an absolute pattern with a relative path
217
223
  # change all to absolute paths
218
224
  files = [to_absolute_path(f, rootpath) for f in to_list(files)]
219
225
  patterns = [to_absolute_path(p, rootpath) for p in to_list(patterns)]
220
226
 
227
+ matched_paths = set()
228
+ for pat in patterns:
229
+ matched_paths.update(glob.glob(str(pat), recursive=True))
230
+
221
231
  for f in files:
222
- for p in patterns:
223
- if f.match(str(p)):
224
- return True
232
+ if str(f) in matched_paths:
233
+ return True
225
234
 
226
235
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: idf-build-apps
3
- Version: 1.0.0rc0
3
+ Version: 1.0.1
4
4
  Summary: Tools for building ESP-IDF related apps.
5
5
  Author-email: Fu Hanxi <fuhanxi@espressif.com>
6
6
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Requires-Dist: pathlib; python_version < '3.4'
20
+ Requires-Dist: glob2; python_version < '3.5'
20
21
  Requires-Dist: pyparsing
21
22
  Requires-Dist: pyyaml
22
23
  Requires-Dist: packaging
@@ -1,18 +1,18 @@
1
- idf_build_apps/__init__.py,sha256=lpGd8b4wdPa8oPqh3bqh3tZsHOxjiGkcRJmdOK-NgLQ,485
1
+ idf_build_apps/__init__.py,sha256=lb-890PZ2eRFvHtV8eCV3AmAl3oE7nrDN7kDsu9SaVw,481
2
2
  idf_build_apps/__main__.py,sha256=8E-5xHm2MlRun0L88XJleNh5U50dpE0Q1nK5KqomA7I,182
3
3
  idf_build_apps/app.py,sha256=sNUWNJs9JrBjzzIDajpR7W0oEu6oc1oQls-jTxK9_ag,26619
4
4
  idf_build_apps/config.py,sha256=FCr1oqk8OJLNXUKxuIi4aJRWaRYalubOzQEQ0YCY2kk,2794
5
5
  idf_build_apps/constants.py,sha256=E3YHqfvR1gb1ppWQ17QSrHQOJjclBVxd-xjTCXJdz9Q,2187
6
- idf_build_apps/finder.py,sha256=P-97-wKfcSnSy3Mb5VYhNiihJ1noMqE_T8s7I2lnkew,6087
6
+ idf_build_apps/finder.py,sha256=Z0UBMAoJrInQofx3BgVJ9g1QDqzidnz0VI9Qevq2B5g,6328
7
7
  idf_build_apps/log.py,sha256=cmofQmHralhTeaM7d3aOScgYm8Swt-pveZ_h1P_PVcs,2220
8
- idf_build_apps/main.py,sha256=wMoe5PU3aFJepSzQtuG5ygNVhEADT6o1Sq9KqZAWZ80,30651
9
- idf_build_apps/utils.py,sha256=5pAbbMOY6g5lKKryyBRfI3xwiepKsw7tG-zkCva-r4Q,6577
8
+ idf_build_apps/main.py,sha256=DYE8Ihc8ZbH88ev4XqzY0z9xFJOrkehY33-UyYAEIZs,30607
9
+ idf_build_apps/utils.py,sha256=ZXv8mtRpLwZCoLWeP-vjGs7xyfX4m6PnRShRm36G0-w,6748
10
10
  idf_build_apps/manifest/__init__.py,sha256=Q2-cb3ngNjnl6_zWhUfzZZB10f_-Rv2JYNck3Lk7UkQ,133
11
11
  idf_build_apps/manifest/if_parser.py,sha256=nFaaTGeEpM5ZrCZlASOAeYe_IpOwJ8zfZmvnEWNYFAE,6321
12
12
  idf_build_apps/manifest/manifest.py,sha256=K8T3vcPeD08DScDTpPahfcpjZgm2zIEcnx7b_k0djb8,5956
13
13
  idf_build_apps/manifest/soc_header.py,sha256=EMre7yIzWyfriW6Lwx8Cho4zikXrbY-wluCDoVAGcAk,3423
14
- idf_build_apps-1.0.0rc0.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
15
- idf_build_apps-1.0.0rc0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
16
- idf_build_apps-1.0.0rc0.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
17
- idf_build_apps-1.0.0rc0.dist-info/METADATA,sha256=etKxKBbmMw984R33bTZ79GaR_qQq7go4eGYwnKxdT1M,5498
18
- idf_build_apps-1.0.0rc0.dist-info/RECORD,,
14
+ idf_build_apps-1.0.1.dist-info/entry_points.txt,sha256=3pVUirUEsb6jsDRikkQWNUt4hqLK2ci1HvW_Vf8b6uE,59
15
+ idf_build_apps-1.0.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
16
+ idf_build_apps-1.0.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
17
+ idf_build_apps-1.0.1.dist-info/METADATA,sha256=DENYCuua0nEi80QNynIjnyjxqQTnxXBe_w_XVh9Q4Q0,5540
18
+ idf_build_apps-1.0.1.dist-info/RECORD,,