@@ -91,42 +91,38 @@ CPython V3.5 and above.
91
91
92
92
## 0.1 Installing uasyncio on bare metal
93
93
94
- MicroPython libraries are located on [ PyPi] ( https://pypi.python.org/pypi ) .
95
- Libraries to be installed are:
96
-
97
- * micropython-uasyncio
98
- * micropython-uasyncio.queues
99
- * micropython-uasyncio.synchro
94
+ If a release build of firmware is used no installation is necessary as uasyncio
95
+ is compiled into the build. The current release build (V1.9.4) does not support
96
+ asynchronous stream I/O.
97
+
98
+ The following instructions cover the case where a release build is not used or
99
+ where a later official ` uasyncio ` version is required for stream I/O. The
100
+ instructions have changed as the version on PyPi is no longer compatible with
101
+ official MicroPython firmware.
102
+
103
+ The following instructions describe copying the bare minimum of files to a
104
+ target device, also the case where ` uasyncio ` is to be frozen into a compiled
105
+ build as bytecode. For the latest release compatible with official firmware
106
+ files must be copied from the official
107
+ [ micropython-lib] ( https://github.com/micropython/micropython-lib ) .
108
+
109
+ Clone the library to a PC with
110
+ ```
111
+ git clone https://github.com/micropython/micropython-lib.git
112
+ ```
113
+ On the target hardware create a ` uasyncio ` directory and copy the following
114
+ files to it:
115
+ * ` uasyncio/uasyncio/__init__.py `
116
+ * ` uasyncio.core/uasyncio/core.py `
117
+ * ` uasyncio.synchro/uasyncio/synchro.py `
118
+ * ` uasyncio.queues/uasyncio/queues.py `
100
119
101
120
The ` queues ` and ` synchro ` modules are optional, but are required to run all
102
121
the examples below.
103
122
104
- The official approach is to use the ` upip ` utility as described
105
- [ here] ( https://github.com/micropython/micropython-lib ) . Network enabled
106
- hardware has this included in the firmware so it can be run locally. This is
107
- the preferred approach.
108
-
109
- On non-networked hardware there are two options. One is to use ` upip ` under a
110
- Linux real or virtual machine. This involves installing and building the Unix
111
- version of MicroPython, using ` upip ` to install to a directory on the PC, and
112
- then copying the library to the target.
113
-
114
- The need for Linux and the Unix build may be avoided by using
115
- [ micropip.py] ( https://github.com/peterhinch/micropython-samples/tree/master/micropip ) .
116
- This runs under Python 3.2 or above. Create a temporary directory on your PC
117
- and install to that. Then copy the contents of the temporary directory to the
118
- device. The following assume Linux and a temporary directory named ` ~/syn ` -
119
- adapt to suit your OS. The first option requires that ` micropip.py ` has
120
- executable permission.
121
-
122
- ```
123
- $ ./micropip.py install -p ~/syn micropython-uasyncio
124
- $ python3 -m micropip.py install -p ~/syn micropython-uasyncio
125
- ```
126
-
127
123
The ` uasyncio ` modules may be frozen as bytecode in the usual way, by placing
128
- the ` uasyncio ` and ` collections ` directories in the port's ` modules ` directory
129
- and rebuilding.
124
+ the ` uasyncio ` directory and its contents in the port's ` modules ` directory and
125
+ rebuilding.
130
126
131
127
###### [ Main README] ( ./README.md )
132
128
0 commit comments