1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
|
%global _empty_manifest_terminate_build 0
Name: python-idf-component-manager
Version: 1.2.2
Release: 1
Summary: The component manager for ESP-IDF
License: Apache License 2.0
URL: https://github.com/espressif/idf-component-manager
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/76/17/04fbb8fad81791e84cefe343db7c5674fd7b56c495460a9abb6e600efb11/idf_component_manager-1.2.2.tar.gz
BuildArch: noarch
Requires: python3-future
Requires: python3-packaging
Requires: python3-requests
Requires: python3-requests-file
Requires: python3-requests-toolbelt
Requires: python3-schema
Requires: python3-six
Requires: python3-tqdm
Requires: python3-click
Requires: python3-pathlib
Requires: python3-cachecontrol[filecache]
Requires: python3-cffi
Requires: python3-contextlib2
Requires: python3-colorama
Requires: python3-pyyaml
Requires: python3-click
Requires: python3-pyyaml
Requires: python3-click
Requires: python3-click
Requires: python3-colorama
Requires: python3-pyyaml
Requires: python3-cachecontrol[filecache]
Requires: python3-contextlib2
Requires: python3-click
%description
# IDF Component Manager
The IDF Component manager is a tool that downloads dependencies for any [ESP-IDF](https://www.espressif.com/en/products/sdks/esp-idf) CMake project. It makes sure that the right versions of all components required for a successful build of your project are in place. The download happens automatically during a run of CMake. It can source components either from [the component registry](https://components.espressif.com/) or from a git repository.
**A list of components can be found at https://components.espressif.com/**
## Installing the IDF Component Manager
IDF component manager can be used with ESP-IDF v4.1 and later.
It is installed by default with ESP-IDF v4.4+ and recent bug-fix releases of ESP-IDF 4.1+.
To check the installed version of the IDF component manager, first, activate [ESP-IDF environment](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation). On macOS and Linux:
```bash
source $IDF_PATH/export.sh
```
Then run the command:
```bash
python -m idf_component_manager -h
```
To update to the most recent version:
```bash
pip install idf-component-manager --upgrade
```
## Disabling the Component Manager
The component manager can be explicitly disabled by setting `IDF_COMPONENT_MANAGER` environment variable to `0`.
## Using with a project
You can add `idf_component.yml` manifest files with the list of dependencies to any component in your project.
IDF Component Manager will download dependencies automatically during the project build process.
When CMake configures the project (e.g. `idf.py reconfigure`) component manager does a few things:
- Processes `idf_component.yml` manifests for every component in the project
- Creates a `dependencies.lock` file in the root of the project with a full list of dependencies
- Downloads all dependencies to the `managed_components` directory
The component manager won't try to regenerate `dependencies.lock` or download any components if manifests, lock file, and content of `managed_component` directory weren't modified since the last successful build.
## Defining dependencies in the manifest
All dependencies are defined in the manifest file.
```yaml
dependencies:
# Required IDF version
idf: ">=4.1"
# For components maintained by Espressif only name can be used.
# Same as `espressif/component`
component:
version: "~2.0.0"
# Or in a shorter form
component2: ">=1.0.0"
# For 3rd party components :
username/component:
version: "~1.0.0"
# For transient dependencies `public` flag can be set.
public: true
anotheruser/component: "<3.2.20"
# For components hosted on non-default registry:
company_user/component:
version: "~1.0.0"
service_url: "https://componentregistry.company.com"
# For components in git repository:
test_component:
path: test_component
git: ssh://git@gitlab.com/user/components.git
# For test projects during component development
# components can be used from a local directory
# with relative or absolute path
some_local_component:
path: ../../projects/component
# For optional dependencies
optional_component:
version: "~1.0.0"
rules: # will add "optional_component" only when all if clauses are True
- if: "idf_version >=3.3,<5.0" # supports all SimpleSpec grammars (https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec)
- if: "target in [esp32, esp32c3]" # supports boolean operator ==, !=, in, not in.
# For example of the component
namespace/component_with_example:
version: "~1.0.0" # if there is no `override_path` field, use component from registry
override_path: "../../" # use component in a local directory, not from registry
namespace/no_required_component:
version: "*"
require: no # Download component but don't add it as a requirement
namespace/pre_release_component:
version: "*"
pre_release: true # Allow downloading of pre-release versions
```
## Environment variables in manifest
You can use environment variables in values in `idf_component.yml` manifests. `$VAR` or `${VAR}` is replaced with the value of the `VAR` environment variable. If the environment variable is not defined, the component manager will raise an error.
Variable name should be ASCII alphanumeric string (including underscores) and start with an underscore or ASCII letter. The first non-identifier character after the `$` terminates this placeholder specification. You can escape `$` with one more`$` character, i.e., `$$` is replaced with `$`.
One possible use-case is providing authentication to git repositories accessed through HTTPS:
```yaml
dependencies:
my_component:
git: https://git:${ACCESS_TOKEN}@git.my_git.com/my_component.git
```
## Component metadata caching
By default information about available versions of components is cached for 5 minutes. You can adjust caching period by setting the duration in minutes to `IDF_COMPONENT_API_CACHE_EXPIRATION_MINUTES` environment variable or disable the cache entirely by setting it to 0.
## External links
You can add links to the `idf_component.yml` file to the root of the manifest:
```yaml
url: "https://example.com/homepage" # URL of the component homepage
repository: "https://gitexample.com/test_project" # URL of the public repository with component source code, i.e GitHub, GitLab, etc.
documentation: "https://example.com/documentation" # URL of the component documentation
issues: "https://git.example.com/test_project/tracker" # URL of the issue tracker
discussion: "https://discord.example.com/test_project" # URL of the component discussion, i.e. Discord, Gitter, forum, etc.
```
A link should be a correct HTTP(S) URL like `https://example.com/path` except the `repository` field,
it is expected to be a valid [Git remote](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) URL.
## Add examples to the component
To add examples to your component place them in the `examples` directory inside your component.
Examples are discovered recursively in subdirectories at this path.
A directory with `CMakeLists.txt` that registers a project is considered as an example.
## Custom example paths
You can specify custom example paths for uploading them to the component registry.
For that, add `examples` field to the root of the manifest:
```yaml
examples:
- path: ../some/path
- path: ../some/other_path
```
## Contributions Guide
We welcome all contributions to the Component Manager project.
You can contribute by fixing bugs, adding features, adding documentation, or reporting an [issue](https://github.com/espressif/idf-component-manager/issues). We accept contributions via [Github Pull Requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
Before reporting an issue, make sure you've searched for a similar one that was already created. If you are reporting a new issue, please follow the Issue Template.
## Resources
- The Python Package Index project page https://pypi.org/project/idf-component-manager/
- The Component Manager section in the [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html)
%package -n python3-idf-component-manager
Summary: The component manager for ESP-IDF
Provides: python-idf-component-manager
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-idf-component-manager
# IDF Component Manager
The IDF Component manager is a tool that downloads dependencies for any [ESP-IDF](https://www.espressif.com/en/products/sdks/esp-idf) CMake project. It makes sure that the right versions of all components required for a successful build of your project are in place. The download happens automatically during a run of CMake. It can source components either from [the component registry](https://components.espressif.com/) or from a git repository.
**A list of components can be found at https://components.espressif.com/**
## Installing the IDF Component Manager
IDF component manager can be used with ESP-IDF v4.1 and later.
It is installed by default with ESP-IDF v4.4+ and recent bug-fix releases of ESP-IDF 4.1+.
To check the installed version of the IDF component manager, first, activate [ESP-IDF environment](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation). On macOS and Linux:
```bash
source $IDF_PATH/export.sh
```
Then run the command:
```bash
python -m idf_component_manager -h
```
To update to the most recent version:
```bash
pip install idf-component-manager --upgrade
```
## Disabling the Component Manager
The component manager can be explicitly disabled by setting `IDF_COMPONENT_MANAGER` environment variable to `0`.
## Using with a project
You can add `idf_component.yml` manifest files with the list of dependencies to any component in your project.
IDF Component Manager will download dependencies automatically during the project build process.
When CMake configures the project (e.g. `idf.py reconfigure`) component manager does a few things:
- Processes `idf_component.yml` manifests for every component in the project
- Creates a `dependencies.lock` file in the root of the project with a full list of dependencies
- Downloads all dependencies to the `managed_components` directory
The component manager won't try to regenerate `dependencies.lock` or download any components if manifests, lock file, and content of `managed_component` directory weren't modified since the last successful build.
## Defining dependencies in the manifest
All dependencies are defined in the manifest file.
```yaml
dependencies:
# Required IDF version
idf: ">=4.1"
# For components maintained by Espressif only name can be used.
# Same as `espressif/component`
component:
version: "~2.0.0"
# Or in a shorter form
component2: ">=1.0.0"
# For 3rd party components :
username/component:
version: "~1.0.0"
# For transient dependencies `public` flag can be set.
public: true
anotheruser/component: "<3.2.20"
# For components hosted on non-default registry:
company_user/component:
version: "~1.0.0"
service_url: "https://componentregistry.company.com"
# For components in git repository:
test_component:
path: test_component
git: ssh://git@gitlab.com/user/components.git
# For test projects during component development
# components can be used from a local directory
# with relative or absolute path
some_local_component:
path: ../../projects/component
# For optional dependencies
optional_component:
version: "~1.0.0"
rules: # will add "optional_component" only when all if clauses are True
- if: "idf_version >=3.3,<5.0" # supports all SimpleSpec grammars (https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec)
- if: "target in [esp32, esp32c3]" # supports boolean operator ==, !=, in, not in.
# For example of the component
namespace/component_with_example:
version: "~1.0.0" # if there is no `override_path` field, use component from registry
override_path: "../../" # use component in a local directory, not from registry
namespace/no_required_component:
version: "*"
require: no # Download component but don't add it as a requirement
namespace/pre_release_component:
version: "*"
pre_release: true # Allow downloading of pre-release versions
```
## Environment variables in manifest
You can use environment variables in values in `idf_component.yml` manifests. `$VAR` or `${VAR}` is replaced with the value of the `VAR` environment variable. If the environment variable is not defined, the component manager will raise an error.
Variable name should be ASCII alphanumeric string (including underscores) and start with an underscore or ASCII letter. The first non-identifier character after the `$` terminates this placeholder specification. You can escape `$` with one more`$` character, i.e., `$$` is replaced with `$`.
One possible use-case is providing authentication to git repositories accessed through HTTPS:
```yaml
dependencies:
my_component:
git: https://git:${ACCESS_TOKEN}@git.my_git.com/my_component.git
```
## Component metadata caching
By default information about available versions of components is cached for 5 minutes. You can adjust caching period by setting the duration in minutes to `IDF_COMPONENT_API_CACHE_EXPIRATION_MINUTES` environment variable or disable the cache entirely by setting it to 0.
## External links
You can add links to the `idf_component.yml` file to the root of the manifest:
```yaml
url: "https://example.com/homepage" # URL of the component homepage
repository: "https://gitexample.com/test_project" # URL of the public repository with component source code, i.e GitHub, GitLab, etc.
documentation: "https://example.com/documentation" # URL of the component documentation
issues: "https://git.example.com/test_project/tracker" # URL of the issue tracker
discussion: "https://discord.example.com/test_project" # URL of the component discussion, i.e. Discord, Gitter, forum, etc.
```
A link should be a correct HTTP(S) URL like `https://example.com/path` except the `repository` field,
it is expected to be a valid [Git remote](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) URL.
## Add examples to the component
To add examples to your component place them in the `examples` directory inside your component.
Examples are discovered recursively in subdirectories at this path.
A directory with `CMakeLists.txt` that registers a project is considered as an example.
## Custom example paths
You can specify custom example paths for uploading them to the component registry.
For that, add `examples` field to the root of the manifest:
```yaml
examples:
- path: ../some/path
- path: ../some/other_path
```
## Contributions Guide
We welcome all contributions to the Component Manager project.
You can contribute by fixing bugs, adding features, adding documentation, or reporting an [issue](https://github.com/espressif/idf-component-manager/issues). We accept contributions via [Github Pull Requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
Before reporting an issue, make sure you've searched for a similar one that was already created. If you are reporting a new issue, please follow the Issue Template.
## Resources
- The Python Package Index project page https://pypi.org/project/idf-component-manager/
- The Component Manager section in the [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html)
%package help
Summary: Development documents and examples for idf-component-manager
Provides: python3-idf-component-manager-doc
%description help
# IDF Component Manager
The IDF Component manager is a tool that downloads dependencies for any [ESP-IDF](https://www.espressif.com/en/products/sdks/esp-idf) CMake project. It makes sure that the right versions of all components required for a successful build of your project are in place. The download happens automatically during a run of CMake. It can source components either from [the component registry](https://components.espressif.com/) or from a git repository.
**A list of components can be found at https://components.espressif.com/**
## Installing the IDF Component Manager
IDF component manager can be used with ESP-IDF v4.1 and later.
It is installed by default with ESP-IDF v4.4+ and recent bug-fix releases of ESP-IDF 4.1+.
To check the installed version of the IDF component manager, first, activate [ESP-IDF environment](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation). On macOS and Linux:
```bash
source $IDF_PATH/export.sh
```
Then run the command:
```bash
python -m idf_component_manager -h
```
To update to the most recent version:
```bash
pip install idf-component-manager --upgrade
```
## Disabling the Component Manager
The component manager can be explicitly disabled by setting `IDF_COMPONENT_MANAGER` environment variable to `0`.
## Using with a project
You can add `idf_component.yml` manifest files with the list of dependencies to any component in your project.
IDF Component Manager will download dependencies automatically during the project build process.
When CMake configures the project (e.g. `idf.py reconfigure`) component manager does a few things:
- Processes `idf_component.yml` manifests for every component in the project
- Creates a `dependencies.lock` file in the root of the project with a full list of dependencies
- Downloads all dependencies to the `managed_components` directory
The component manager won't try to regenerate `dependencies.lock` or download any components if manifests, lock file, and content of `managed_component` directory weren't modified since the last successful build.
## Defining dependencies in the manifest
All dependencies are defined in the manifest file.
```yaml
dependencies:
# Required IDF version
idf: ">=4.1"
# For components maintained by Espressif only name can be used.
# Same as `espressif/component`
component:
version: "~2.0.0"
# Or in a shorter form
component2: ">=1.0.0"
# For 3rd party components :
username/component:
version: "~1.0.0"
# For transient dependencies `public` flag can be set.
public: true
anotheruser/component: "<3.2.20"
# For components hosted on non-default registry:
company_user/component:
version: "~1.0.0"
service_url: "https://componentregistry.company.com"
# For components in git repository:
test_component:
path: test_component
git: ssh://git@gitlab.com/user/components.git
# For test projects during component development
# components can be used from a local directory
# with relative or absolute path
some_local_component:
path: ../../projects/component
# For optional dependencies
optional_component:
version: "~1.0.0"
rules: # will add "optional_component" only when all if clauses are True
- if: "idf_version >=3.3,<5.0" # supports all SimpleSpec grammars (https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.SimpleSpec)
- if: "target in [esp32, esp32c3]" # supports boolean operator ==, !=, in, not in.
# For example of the component
namespace/component_with_example:
version: "~1.0.0" # if there is no `override_path` field, use component from registry
override_path: "../../" # use component in a local directory, not from registry
namespace/no_required_component:
version: "*"
require: no # Download component but don't add it as a requirement
namespace/pre_release_component:
version: "*"
pre_release: true # Allow downloading of pre-release versions
```
## Environment variables in manifest
You can use environment variables in values in `idf_component.yml` manifests. `$VAR` or `${VAR}` is replaced with the value of the `VAR` environment variable. If the environment variable is not defined, the component manager will raise an error.
Variable name should be ASCII alphanumeric string (including underscores) and start with an underscore or ASCII letter. The first non-identifier character after the `$` terminates this placeholder specification. You can escape `$` with one more`$` character, i.e., `$$` is replaced with `$`.
One possible use-case is providing authentication to git repositories accessed through HTTPS:
```yaml
dependencies:
my_component:
git: https://git:${ACCESS_TOKEN}@git.my_git.com/my_component.git
```
## Component metadata caching
By default information about available versions of components is cached for 5 minutes. You can adjust caching period by setting the duration in minutes to `IDF_COMPONENT_API_CACHE_EXPIRATION_MINUTES` environment variable or disable the cache entirely by setting it to 0.
## External links
You can add links to the `idf_component.yml` file to the root of the manifest:
```yaml
url: "https://example.com/homepage" # URL of the component homepage
repository: "https://gitexample.com/test_project" # URL of the public repository with component source code, i.e GitHub, GitLab, etc.
documentation: "https://example.com/documentation" # URL of the component documentation
issues: "https://git.example.com/test_project/tracker" # URL of the issue tracker
discussion: "https://discord.example.com/test_project" # URL of the component discussion, i.e. Discord, Gitter, forum, etc.
```
A link should be a correct HTTP(S) URL like `https://example.com/path` except the `repository` field,
it is expected to be a valid [Git remote](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) URL.
## Add examples to the component
To add examples to your component place them in the `examples` directory inside your component.
Examples are discovered recursively in subdirectories at this path.
A directory with `CMakeLists.txt` that registers a project is considered as an example.
## Custom example paths
You can specify custom example paths for uploading them to the component registry.
For that, add `examples` field to the root of the manifest:
```yaml
examples:
- path: ../some/path
- path: ../some/other_path
```
## Contributions Guide
We welcome all contributions to the Component Manager project.
You can contribute by fixing bugs, adding features, adding documentation, or reporting an [issue](https://github.com/espressif/idf-component-manager/issues). We accept contributions via [Github Pull Requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
Before reporting an issue, make sure you've searched for a similar one that was already created. If you are reporting a new issue, please follow the Issue Template.
## Resources
- The Python Package Index project page https://pypi.org/project/idf-component-manager/
- The Component Manager section in the [ESP-IDF Programming Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html)
%prep
%autosetup -n idf-component-manager-1.2.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-idf-component-manager -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.2-1
- Package Spec generated
|