|
1 | 1 | ~~~~ |
2 | | -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 2 | +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
3 | 3 | micropython-lib is highly experimental community project. |
4 | 4 |
|
5 | | -Please help to drive it to just "expiremental" state by testing provided |
6 | | -packages with MicroPython. |
7 | | -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 5 | +Please help to drive it to just "expiremental" state by testing |
| 6 | +provided packages with MicroPython. |
| 7 | +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
8 | 8 | ~~~~ |
9 | 9 |
|
10 | 10 | micropython-lib |
11 | 11 | =============== |
12 | | - |
13 | 12 | micropython-lib is a project to develop non-monolothic standard library |
14 | 13 | for MicroPython. Each module or package is available as a seprate |
15 | 14 | distribution package from PyPI. Modules either written from scratch or |
16 | | -ported from CPython. |
| 15 | +ported from CPython. Note that main target of micropython-lib is so |
| 16 | +far "Unix" port of MicroPython. Actual requirements vary per module |
| 17 | +(basicly, if module is not related to I/O, it should work without |
| 18 | +problem on baremetal ports too). |
| 19 | + |
| 20 | +Usage |
| 21 | +----- |
| 22 | +micropython-lib packages are published on PyPI (Python Package Index), |
| 23 | +standard Python community package repository: http://pypi.python.org/ . |
| 24 | +You can search for MicroPython related packages, read additional info, |
| 25 | +etc. |
| 26 | + |
| 27 | +To install packages from PyPI for usage on your local system, use |
| 28 | +"pip-micropython" tool, which is a simple wrapper around a standard |
| 29 | +"pip" tool, which is used to install package for CPython. |
| 30 | +"pip-micropython" tool can be found in "tools" subdirectory of the main |
| 31 | +MicroPython repository (https://github.com/micropython/micropython). |
| 32 | +Just install "pip-micropython" script somewhere on your PATH. |
| 33 | + |
| 34 | +Afterwards, just use pip-micropython in a way similar to pip: |
| 35 | + |
| 36 | +~~~~ |
| 37 | +$ pip-micropython install micropython-copy |
| 38 | +$ micropython |
| 39 | +>>> import copy |
| 40 | +>>> copy.copy([1, 2, 3]) |
| 41 | +[1, 2, 3] |
| 42 | +~~~~ |
| 43 | + |
| 44 | +Review pip-micropython source code for more info. |
17 | 45 |
|
| 46 | +Development |
| 47 | +----------- |
| 48 | +To install modules during development, use "make install". By default, it |
| 49 | +will install all available packages. You can pass MOD=<module> parameter |
| 50 | +to install specific module. |
| 51 | + |
| 52 | +Links |
| 53 | +----- |
18 | 54 | More info: |
| 55 | + |
19 | 56 | * https://github.com/micropython/micropython/issues/405 |
20 | 57 | * http://forum.micropython.org/viewtopic.php?f=5&t=70 |
21 | 58 |
|
|
0 commit comments