Skip to content

Commit 7a17596

Browse files
brainelectronicsdpgeorge
authored andcommitted
docs/reference/packages: Add GitHub repo to package example dependency.
Signed-off-by: Jonas Scharpf <[email protected]>
1 parent 5159304 commit 7a17596

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/reference/packages.rst

+8-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ can be downloaded by specifying the path to their ``package.json``.
5353
If no json file is specified, then "package.json" is implicitly added::
5454

5555
>>> mip.install("http://example.com/x/")
56-
>>> mip.install("github:org/repo")
56+
>>> mip.install("github:org/repo") # Uses default branch of that repo
5757
>>> mip.install("github:org/repo", version="branch-or-tag")
5858

5959

@@ -108,9 +108,9 @@ https://github.com/micropython/micropython-lib for more information.
108108

109109
To write a "self-hosted" package that can be downloaded by ``mip`` or
110110
``mpremote``, you need a static webserver (or GitHub) to host either a
111-
single .py file, or a package.json file alongside your .py files.
111+
single .py file, or a ``package.json`` file alongside your .py files.
112112

113-
A typical package.json for an example ``mlx90640`` library looks like::
113+
A typical ``package.json`` for an example ``mlx90640`` library looks like::
114114

115115
{
116116
"urls": [
@@ -119,15 +119,18 @@ A typical package.json for an example ``mlx90640`` library looks like::
119119
],
120120
"deps": [
121121
["collections-defaultdict", "latest"],
122-
["os-path", "latest"]
122+
["os-path", "latest"],
123+
["github:org/micropython-additions", "main"]
123124
],
124125
"version": "0.2"
125126
}
126127

127128
This includes two files, hosted at a GitHub repo named
128129
``org/micropython-mlx90640``, which install into the ``mlx90640`` directory on
129130
the device. It depends on ``collections-defaultdict`` and ``os-path`` which will
130-
be installed automatically.
131+
be installed automatically from the :term:`micropython-lib`. The third
132+
dependency installs the content as defined by the ``package.json`` file of the
133+
``main`` branch of the GitHub repo ``org/micropython-additions``.
131134

132135
Freezing packages
133136
-----------------

0 commit comments

Comments
 (0)