Skip to content

Commit 8d8ff26

Browse files
fix mip installation commands in README and INSTALLATION documentation
1 parent a1c8b41 commit 8d8ff26

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ station.active(True)
7272
station.connect('SSID', 'PASSWORD')
7373
time.sleep(1)
7474
print('Device connected to network: {}'.format(station.isconnected()))
75-
mip.install('micropython-modbus', index='https://pypi.org/pypi')
75+
mip.install('github:brainelectronics/micropython-modbus')
7676
print('Installation completed')
7777
machine.soft_reset()
7878
```
@@ -168,7 +168,7 @@ device, connect to a network and install them via `upip` as follows
168168
```python
169169
# with MicroPython version 1.19.1 or newer
170170
import mip
171-
mip.install('micropython-brainelectronics-helpers', index='https://pypi.org/pypi')
171+
mip.install('github:brainelectronics/micropython-modules')
172172

173173
# before MicroPython version 1.19.1
174174
import upip

docs/INSTALLATION.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,44 @@ versions check the [upip section below](#install-with-upip)
3636
micropython-lib as its index by default.
3737
```
3838

39-
As this library is pushed to [PyPi][ref-micropython-modbus-pypi] and
40-
[TestPyPi][ref-micropython-modbus-test-pypi], but not the default
41-
[micropython-lib index](https://micropython.org/pi/v2) the additional index
42-
has to be specified explicitly.
39+
As this library is not pushed to the default
40+
[micropython-lib index](https://micropython.org/pi/v2), the installation has
41+
to be done via the package definition file (`package.json`) provided with this
42+
repo.
4343

4444
```python
4545
import mip
46-
mip.install('micropython-modbus', index='https://pypi.org/pypi')
46+
mip.install('github:brainelectronics/micropython-modbus')
4747
```
4848

49-
In order to install the latest release candidate version, set the index to
50-
`'https://test.pypi.org/pypi'`
49+
In order to install the latest release candidate version, select a version from
50+
the [repo tags overview][ref-github-micropython-modbus-tags]
5151

5252
```python
5353
import mip
54-
mip.install('micropython-modbus', index='https://test.pypi.org/pypi')
54+
mip.install('github:brainelectronics/micropython-modbus', version='2.3.3-rc31.dev59')
5555
```
5656

5757
### Install with upip
5858

59+
This library is pushed to [PyPi][ref-micropython-modbus-pypi] and
60+
[TestPyPi][ref-micropython-modbus-test-pypi]. The installation from those
61+
package indices is currently not supported with MicroPython v1.19.1 or newer.
62+
The package can be installed on older MicroPython versions with the following
63+
commands.
64+
65+
```{note}
66+
`upip` is not able to install a specific version of a package. It will always
67+
use the latest available version.
68+
```
69+
5970
```python
6071
import upip
6172
upip.install('micropython-modbus')
6273
```
6374

6475
In order to install the latest release candidate version, use the following
65-
commands
76+
commands.
6677

6778
```python
6879
import upip
@@ -87,14 +98,14 @@ To install the latest officially released library version use the following
8798
command
8899

89100
```bash
90-
mpremote connect /dev/tty.SLAB_USBtoUART mip install --index https://pypi.org/pypi micropython-modbus
101+
mpremote connect /dev/tty.SLAB_USBtoUART mip install github:brainelectronics/micropython-modbus
91102
```
92103

93104
In order to install the latest release candidate version, use the following
94105
command
95106

96107
```bash
97-
mpremote connect /dev/tty.SLAB_USBtoUART mip install --index https://test.pypi.org/pypi micropython-modbus
108+
mpremote connect /dev/tty.SLAB_USBtoUART mip install github:brainelectronics/micropython-modbus
98109
```
99110

100111
### Manually
@@ -158,6 +169,7 @@ README for further instructions.
158169

159170
<!-- Links -->
160171
[ref-micropython-modbus-test-pypi]: https://test.pypi.org/project/micropython-modbus/
172+
[ref-github-micropython-modbus-tags]: https://github.com/brainelectronics/micropython-modbus/tags
161173
[ref-micropython-modbus-pypi]: https://pypi.org/project/micropython-modbus/
162174
[ref-mpremote]: https://docs.micropython.org/en/v1.19.1/reference/mpremote.html#mpremote
163175
[ref-mpremote-doc]: https://docs.micropython.org/en/v1.19.1/reference/mpremote.html

0 commit comments

Comments
 (0)