src/eric7/Documentation/Source/eric7.MicroPython.MipLocalInstaller.html

branch
eric7
changeset 10479
856476537696
parent 9979
dbafba79461d
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.MicroPython.MipLocalInstaller</h1> 9 <h1>eric7.MicroPython.MipLocalInstaller</h1>
10
11 <p> 10 <p>
12 Module implementing a MicroPython package installer for devices missing the onboard 11 Module implementing a MicroPython package installer for devices missing the onboard
13 'mip' package. 12 'mip' package.
14 </p> 13 </p>
14
15 <h3>Global Attributes</h3> 15 <h3>Global Attributes</h3>
16
17 <table> 16 <table>
18 <tr><td>MicroPythonPackageIndex</td></tr> 17 <tr><td>MicroPythonPackageIndex</td></tr>
19 </table> 18 </table>
19
20 <h3>Classes</h3> 20 <h3>Classes</h3>
21 21 <table>
22 <table>
23
24 <tr> 22 <tr>
25 <td><a href="#MipLocalInstaller">MipLocalInstaller</a></td> 23 <td><a href="#MipLocalInstaller">MipLocalInstaller</a></td>
26 <td>Class implementing a MicroPython package installer ('mip' replacement).</td> 24 <td>Class implementing a MicroPython package installer ('mip' replacement).</td>
27 </tr> 25 </tr>
28 </table> 26 </table>
27
29 <h3>Functions</h3> 28 <h3>Functions</h3>
30
31 <table> 29 <table>
32 <tr><td>None</td></tr> 30 <tr><td>None</td></tr>
33 </table> 31 </table>
32
34 <hr /> 33 <hr />
35 <hr /> 34 <hr />
36 <a NAME="MipLocalInstaller" ID="MipLocalInstaller"></a> 35 <a NAME="MipLocalInstaller" ID="MipLocalInstaller"></a>
37 <h2>MipLocalInstaller</h2> 36 <h2>MipLocalInstaller</h2>
38
39 <p> 37 <p>
40 Class implementing a MicroPython package installer ('mip' replacement). 38 Class implementing a MicroPython package installer ('mip' replacement).
41 </p> 39 </p>
40
42 <h3>Derived from</h3> 41 <h3>Derived from</h3>
43 QObject 42 QObject
44 <h3>Class Attributes</h3> 43 <h3>Class Attributes</h3>
45
46 <table> 44 <table>
47 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
48 </table> 46 </table>
47
49 <h3>Class Methods</h3> 48 <h3>Class Methods</h3>
50
51 <table> 49 <table>
52 <tr><td>None</td></tr> 50 <tr><td>None</td></tr>
53 </table> 51 </table>
52
54 <h3>Methods</h3> 53 <h3>Methods</h3>
55 54 <table>
56 <table>
57
58 <tr> 55 <tr>
59 <td><a href="#MipLocalInstaller.__init__">MipLocalInstaller</a></td> 56 <td><a href="#MipLocalInstaller.__init__">MipLocalInstaller</a></td>
60 <td>Constructor</td> 57 <td>Constructor</td>
61 </tr> 58 </tr>
62 <tr> 59 <tr>
82 <tr> 79 <tr>
83 <td><a href="#MipLocalInstaller.installPackage">installPackage</a></td> 80 <td><a href="#MipLocalInstaller.installPackage">installPackage</a></td>
84 <td>Public method to install a MicroPython package.</td> 81 <td>Public method to install a MicroPython package.</td>
85 </tr> 82 </tr>
86 </table> 83 </table>
84
87 <h3>Static Methods</h3> 85 <h3>Static Methods</h3>
88
89 <table> 86 <table>
90 <tr><td>None</td></tr> 87 <tr><td>None</td></tr>
91 </table> 88 </table>
89
92 90
93 <a NAME="MipLocalInstaller.__init__" ID="MipLocalInstaller.__init__"></a> 91 <a NAME="MipLocalInstaller.__init__" ID="MipLocalInstaller.__init__"></a>
94 <h4>MipLocalInstaller (Constructor)</h4> 92 <h4>MipLocalInstaller (Constructor)</h4>
95 <b>MipLocalInstaller</b>(<i>device, parent=None</i>) 93 <b>MipLocalInstaller</b>(<i>device, parent=None</i>)
96
97 <p> 94 <p>
98 Constructor 95 Constructor
99 </p> 96 </p>
97
100 <dl> 98 <dl>
101 99
102 <dt><i>device</i> (BaseDevice)</dt> 100 <dt><i>device</i> (BaseDevice)</dt>
103 <dd> 101 <dd>
104 reference to the connected device 102 reference to the connected device
109 </dd> 107 </dd>
110 </dl> 108 </dl>
111 <a NAME="MipLocalInstaller.__getFile" ID="MipLocalInstaller.__getFile"></a> 109 <a NAME="MipLocalInstaller.__getFile" ID="MipLocalInstaller.__getFile"></a>
112 <h4>MipLocalInstaller.__getFile</h4> 110 <h4>MipLocalInstaller.__getFile</h4>
113 <b>__getFile</b>(<i>fileUrl</i>) 111 <b>__getFile</b>(<i>fileUrl</i>)
114
115 <p> 112 <p>
116 Private method to download the requested file. 113 Private method to download the requested file.
117 </p> 114 </p>
115
118 <dl> 116 <dl>
119 117
120 <dt><i>fileUrl</i> (QUrl)</dt> 118 <dt><i>fileUrl</i> (QUrl)</dt>
121 <dd> 119 <dd>
122 URL of the requested file 120 URL of the requested file
135 </dd> 133 </dd>
136 </dl> 134 </dl>
137 <a NAME="MipLocalInstaller.__installFile" ID="MipLocalInstaller.__installFile"></a> 135 <a NAME="MipLocalInstaller.__installFile" ID="MipLocalInstaller.__installFile"></a>
138 <h4>MipLocalInstaller.__installFile</h4> 136 <h4>MipLocalInstaller.__installFile</h4>
139 <b>__installFile</b>(<i>fileUrl, targetDir, targetFile</i>) 137 <b>__installFile</b>(<i>fileUrl, targetDir, targetFile</i>)
140
141 <p> 138 <p>
142 Private method to download a file and copy the data to the given target 139 Private method to download a file and copy the data to the given target
143 directory. 140 directory.
144 </p> 141 </p>
142
145 <dl> 143 <dl>
146 144
147 <dt><i>fileUrl</i> (str)</dt> 145 <dt><i>fileUrl</i> (str)</dt>
148 <dd> 146 <dd>
149 URL of the file to be downloaded and installed 147 URL of the file to be downloaded and installed
170 </dd> 168 </dd>
171 </dl> 169 </dl>
172 <a NAME="MipLocalInstaller.__installJson" ID="MipLocalInstaller.__installJson"></a> 170 <a NAME="MipLocalInstaller.__installJson" ID="MipLocalInstaller.__installJson"></a>
173 <h4>MipLocalInstaller.__installJson</h4> 171 <h4>MipLocalInstaller.__installJson</h4>
174 <b>__installJson</b>(<i>packageJson, version, mpy, target, index</i>) 172 <b>__installJson</b>(<i>packageJson, version, mpy, target, index</i>)
175
176 <p> 173 <p>
177 Private method to install a package and its dependencies as defined by the 174 Private method to install a package and its dependencies as defined by the
178 package JSON file. 175 package JSON file.
179 </p> 176 </p>
177
180 <dl> 178 <dl>
181 179
182 <dt><i>packageJson</i> (dict)</dt> 180 <dt><i>packageJson</i> (dict)</dt>
183 <dd> 181 <dd>
184 dictionary containing the package data 182 dictionary containing the package data
213 </dd> 211 </dd>
214 </dl> 212 </dl>
215 <a NAME="MipLocalInstaller.__rewriteUrl" ID="MipLocalInstaller.__rewriteUrl"></a> 213 <a NAME="MipLocalInstaller.__rewriteUrl" ID="MipLocalInstaller.__rewriteUrl"></a>
216 <h4>MipLocalInstaller.__rewriteUrl</h4> 214 <h4>MipLocalInstaller.__rewriteUrl</h4>
217 <b>__rewriteUrl</b>(<i>url, branch=None</i>) 215 <b>__rewriteUrl</b>(<i>url, branch=None</i>)
218
219 <p> 216 <p>
220 Private method to rewrite the given URL in case of a Github URL. 217 Private method to rewrite the given URL in case of a Github URL.
221 </p> 218 </p>
219
222 <dl> 220 <dl>
223 221
224 <dt><i>url</i> (str)</dt> 222 <dt><i>url</i> (str)</dt>
225 <dd> 223 <dd>
226 URL to be checked and potentially changed 224 URL to be checked and potentially changed
243 </dd> 241 </dd>
244 </dl> 242 </dl>
245 <a NAME="MipLocalInstaller.errorString" ID="MipLocalInstaller.errorString"></a> 243 <a NAME="MipLocalInstaller.errorString" ID="MipLocalInstaller.errorString"></a>
246 <h4>MipLocalInstaller.errorString</h4> 244 <h4>MipLocalInstaller.errorString</h4>
247 <b>errorString</b>(<i></i>) 245 <b>errorString</b>(<i></i>)
248
249 <p> 246 <p>
250 Public method to get the last error as a string. 247 Public method to get the last error as a string.
251 </p> 248 </p>
249
252 <dl> 250 <dl>
253 <dt>Return:</dt> 251 <dt>Return:</dt>
254 <dd> 252 <dd>
255 latest error 253 latest error
256 </dd> 254 </dd>
262 </dd> 260 </dd>
263 </dl> 261 </dl>
264 <a NAME="MipLocalInstaller.installPackage" ID="MipLocalInstaller.installPackage"></a> 262 <a NAME="MipLocalInstaller.installPackage" ID="MipLocalInstaller.installPackage"></a>
265 <h4>MipLocalInstaller.installPackage</h4> 263 <h4>MipLocalInstaller.installPackage</h4>
266 <b>installPackage</b>(<i>package, index=None, target=None, version=None, mpy=True</i>) 264 <b>installPackage</b>(<i>package, index=None, target=None, version=None, mpy=True</i>)
267
268 <p> 265 <p>
269 Public method to install a MicroPython package. 266 Public method to install a MicroPython package.
270 </p> 267 </p>
268
271 <dl> 269 <dl>
272 270
273 <dt><i>package</i> (str)</dt> 271 <dt><i>package</i> (str)</dt>
274 <dd> 272 <dd>
275 package name 273 package name

eric ide

mercurial