kopia lustrzana https://github.com/peterhinch/micropython-samples
Manifest doc describes include statement.
rodzic
2399918b38
commit
ac459af6ce
|
@ -38,19 +38,22 @@ make BOARD=$BOARD FROZEN_MANIFEST=$MANIFEST
|
||||||
where `BOARD` specifies the target (e.g. 'PYBV11') and `MANIFEST` specifies the
|
where `BOARD` specifies the target (e.g. 'PYBV11') and `MANIFEST` specifies the
|
||||||
path to the manifest file (e.g. '~/my_manifest.py').
|
path to the manifest file (e.g. '~/my_manifest.py').
|
||||||
|
|
||||||
A simple manifest file comprises `freeze` calls with one or two args. The first
|
A manifest file comprises `include` and `freeze` statements. The latter have
|
||||||
is a directory specifier. If the second exists it can specify a single file or
|
one or two args. The first is a directory specifier. If the second exists it
|
||||||
more, by passing an iterable. Consider the following manifest file:
|
can specify a single file or more, by passing an iterable. Consider the
|
||||||
|
following manifest file:
|
||||||
```python
|
```python
|
||||||
|
include("$(MPY_DIR)/ports/stm32/boards/PYBD_SF2/manifest.py")
|
||||||
freeze('$(MPY_DIR)/drivers/dht', 'dht.py')
|
freeze('$(MPY_DIR)/drivers/dht', 'dht.py')
|
||||||
freeze('$(MPY_DIR)/tools', ('upip.py', 'upip_utarfile.py'))
|
freeze('$(MPY_DIR)/tools', ('upip.py', 'upip_utarfile.py'))
|
||||||
freeze('/path/to/pyb_d_modules')
|
freeze('/path/to/pyb_d_modules')
|
||||||
```
|
```
|
||||||
Taking the lines in order:
|
Taking the lines in order:
|
||||||
1. The single file argument freezes the file 'dht.py' found in the MicroPython
|
1. This includes another manifest file located in the source tree.
|
||||||
|
2. The single file argument freezes the file 'dht.py' found in the MicroPython
|
||||||
source tree `drivers` directory.
|
source tree `drivers` directory.
|
||||||
2. Passing an iterable causes the two specified files to be frozen.
|
3. Passing an iterable causes the two specified files to be frozen.
|
||||||
3. Passing a directory without arguments causes all files and subdirectories
|
4. Passing a directory without arguments causes all files and subdirectories
|
||||||
to be frozen. Assume '../pyb_d_modules' contains a file `rats.py` and a
|
to be frozen. Assume '../pyb_d_modules' contains a file `rats.py` and a
|
||||||
subdirectory `foo` containing `bar.py`. Then `help('modules')` will show
|
subdirectory `foo` containing `bar.py`. Then `help('modules')` will show
|
||||||
`rats` and `foo/bar`. This means that Python packages are frozen correctly.
|
`rats` and `foo/bar`. This means that Python packages are frozen correctly.
|
||||||
|
|
Ładowanie…
Reference in New Issue