kopia lustrzana https://github.com/micropython/micropython-lib
README: Update to the current state of affairs (pip-micropython -> upip, etc.)
rodzic
fceed2b1bb
commit
88c9eae5e1
44
README.md
44
README.md
|
@ -1,41 +1,41 @@
|
||||||
micropython-lib
|
micropython-lib
|
||||||
===============
|
===============
|
||||||
micropython-lib is a project to develop a non-monolothic standard library
|
micropython-lib is a project to develop a non-monolothic standard library
|
||||||
for MicroPython. Each module or package is available as a separate
|
for MicroPython (https://github.com/micropython/micropython). Each module
|
||||||
distribution package from PyPI. Each module is either written from scratch or
|
or package is available as a separate distribution package from PyPI. Each
|
||||||
ported from CPython.
|
module is either written from scratch or ported from CPython.
|
||||||
|
|
||||||
Note that the main target of micropython-lib is a "Unix" port of MicroPython
|
Note that the main target of micropython-lib is a "Unix" port of MicroPython.
|
||||||
(additional ports to support are to be determined). Actual system requirements
|
Actual system requirements vary per module. Though if a module is not related
|
||||||
vary per module. Though if a module is not related to I/O, the module should
|
to I/O, the module should work without problems on bare-metal ports too (e.g.
|
||||||
work without problem on bare-metal ports too (e.g. pyboard).
|
pyboard).
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
micropython-lib packages are published on PyPI (Python Package Index),
|
micropython-lib packages are published on PyPI (Python Package Index),
|
||||||
the standard Python community package repository: http://pypi.python.org/ .
|
the standard Python community package repository: http://pypi.python.org/ .
|
||||||
On PyPi, you can search for MicroPython related packages and read
|
On PyPI, you can search for MicroPython related packages and read
|
||||||
additional package information.
|
additional package information.
|
||||||
|
|
||||||
To install packages from PyPI for usage on your local system, use the
|
To install packages from PyPI for usage on your local system, use the
|
||||||
`pip-micropython` tool, which is a simple wrapper around the standard
|
`upip` tool, which is MicroPython's native package manager, similar to
|
||||||
`pip` tool, which is used to install packages for CPython.
|
`upip`, which is used to install packages for CPython. `upip` is bundled
|
||||||
The `pip-micropython` tool can be found in `tools` subdirectory
|
with MicroPython "Unix" port (i.e. if you build "Unix" port, you
|
||||||
of the main MicroPython repository (https://github.com/micropython/micropython).
|
automatically have `upip` tool). Following examples assume that
|
||||||
Just install the `pip-micropython` script somewhere on your `PATH`.
|
`micropython` binary is available on your `PATH`:
|
||||||
|
|
||||||
Afterwards, just use `pip-micropython` in a way similar to `pip`:
|
|
||||||
|
|
||||||
~~~~
|
~~~~
|
||||||
$ pip-micropython install micropython-copy
|
$ micropython -m upip install micropython-pystone
|
||||||
|
...
|
||||||
$ micropython
|
$ micropython
|
||||||
>>> import copy
|
>>> import pyston
|
||||||
>>> copy.copy([1, 2, 3])
|
>>> pystone.main()
|
||||||
[1, 2, 3]
|
Pystone(1.2) time for 50000 passes = 0.534
|
||||||
|
This machine benchmarks at 93633 pystones/second
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
Review the `pip-micropython` source code for more info.
|
Run `micropython -m upip --help` for more information about `upip`.
|
||||||
|
|
||||||
|
|
||||||
Development
|
Development
|
||||||
|
@ -47,7 +47,9 @@ available packages will be installed. To install a specific module, add the
|
||||||
|
|
||||||
Links
|
Links
|
||||||
-----
|
-----
|
||||||
More information is on GitHub and in the MicroPython forums:
|
If you would like to trace evolution of MicroPython packaging support,
|
||||||
|
you may find following links useful (note that they may contain outdated
|
||||||
|
information):
|
||||||
|
|
||||||
* https://github.com/micropython/micropython/issues/405
|
* https://github.com/micropython/micropython/issues/405
|
||||||
* http://forum.micropython.org/viewtopic.php?f=5&t=70
|
* http://forum.micropython.org/viewtopic.php?f=5&t=70
|
||||||
|
|
Ładowanie…
Reference in New Issue