diff options
author | Jonas Scharpf <jonas@brainelectronics.de> | 2023-05-27 17:44:26 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2023-06-02 11:25:55 +1000 |
commit | 7a17596e1aa8b10ea3e1cce42d73b46f9bf06078 (patch) | |
tree | 502cf092fb85374cc8cca091f3b95e0a59c0e063 /docs/reference | |
parent | 5159304ca1ded5eb94338234afffcef0210b545a (diff) |
docs/reference/packages: Add GitHub repo to package example dependency.
Signed-off-by: Jonas Scharpf <jonas@brainelectronics.de>
Diffstat (limited to 'docs/reference')
-rw-r--r-- | docs/reference/packages.rst | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/reference/packages.rst b/docs/reference/packages.rst index 1ddbecb58..c9deedea7 100644 --- a/docs/reference/packages.rst +++ b/docs/reference/packages.rst @@ -53,7 +53,7 @@ can be downloaded by specifying the path to their ``package.json``. If no json file is specified, then "package.json" is implicitly added:: >>> mip.install("http://example.com/x/") - >>> mip.install("github:org/repo") + >>> mip.install("github:org/repo") # Uses default branch of that repo >>> mip.install("github:org/repo", version="branch-or-tag") @@ -108,9 +108,9 @@ https://github.com/micropython/micropython-lib for more information. To write a "self-hosted" package that can be downloaded by ``mip`` or ``mpremote``, you need a static webserver (or GitHub) to host either a -single .py file, or a package.json file alongside your .py files. +single .py file, or a ``package.json`` file alongside your .py files. -A typical package.json for an example ``mlx90640`` library looks like:: +A typical ``package.json`` for an example ``mlx90640`` library looks like:: { "urls": [ @@ -119,7 +119,8 @@ A typical package.json for an example ``mlx90640`` library looks like:: ], "deps": [ ["collections-defaultdict", "latest"], - ["os-path", "latest"] + ["os-path", "latest"], + ["github:org/micropython-additions", "main"] ], "version": "0.2" } @@ -127,7 +128,9 @@ A typical package.json for an example ``mlx90640`` library looks like:: This includes two files, hosted at a GitHub repo named ``org/micropython-mlx90640``, which install into the ``mlx90640`` directory on the device. It depends on ``collections-defaultdict`` and ``os-path`` which will -be installed automatically. +be installed automatically from the :term:`micropython-lib`. The third +dependency installs the content as defined by the ``package.json`` file of the +``main`` branch of the GitHub repo ``org/micropython-additions``. Freezing packages ----------------- |