circup 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- circup/__init__.py +26 -0
- circup/backends.py +957 -0
- circup/bundle.py +170 -0
- circup/command_utils.py +627 -0
- circup/commands.py +723 -0
- circup/config/bundle_config.json +5 -0
- circup/config/bundle_config.json.license +3 -0
- circup/logging.py +33 -0
- circup/module.py +209 -0
- circup/shared.py +218 -0
- circup-2.0.1.dist-info/LICENSE +21 -0
- circup-2.0.1.dist-info/METADATA +357 -0
- circup-2.0.1.dist-info/RECORD +16 -0
- circup-2.0.1.dist-info/WHEEL +5 -0
- circup-2.0.1.dist-info/entry_points.txt +2 -0
- circup-2.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: circup
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: A tool to manage/update libraries on CircuitPython devices.
|
|
5
|
+
Author-email: Adafruit Industries <circuitpython@adafruit.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2019 Adafruit Industries
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: homepage, https://github.com/adafruit/circup
|
|
29
|
+
Keywords: adafruit,blinka,circuitpython,micropython,libraries
|
|
30
|
+
Classifier: Development Status :: 3 - Alpha
|
|
31
|
+
Classifier: Environment :: Console
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
33
|
+
Classifier: Intended Audience :: Education
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Operating System :: POSIX
|
|
36
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
37
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
42
|
+
Classifier: Topic :: Education
|
|
43
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
44
|
+
Classifier: Topic :: System :: Software Distribution
|
|
45
|
+
Requires-Python: >=3.9
|
|
46
|
+
Description-Content-Type: text/x-rst
|
|
47
|
+
License-File: LICENSE
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
CircUp
|
|
51
|
+
======
|
|
52
|
+
|
|
53
|
+
.. image:: https://readthedocs.org/projects/circup/badge/?version=latest
|
|
54
|
+
:target: https://circuitpython.readthedocs.io/projects/circup/en/latest/
|
|
55
|
+
:alt: Documentation Status
|
|
56
|
+
|
|
57
|
+
.. image:: https://img.shields.io/discord/327254708534116352.svg
|
|
58
|
+
:target: https://adafru.it/discord
|
|
59
|
+
:alt: Discord
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
.. image:: https://github.com/adafruit/circup/workflows/Build%20CI/badge.svg
|
|
63
|
+
:target: https://github.com/adafruit/circup/actions
|
|
64
|
+
:alt: Build Status
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
68
|
+
:target: https://github.com/psf/black
|
|
69
|
+
:alt: Code Style: Black
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
A tool to manage and update libraries (modules) on a CircuitPython device.
|
|
73
|
+
|
|
74
|
+
.. contents::
|
|
75
|
+
|
|
76
|
+
Installation
|
|
77
|
+
------------
|
|
78
|
+
|
|
79
|
+
Circup requires Python 3.5 or higher.
|
|
80
|
+
|
|
81
|
+
In a `virtualenv <https://virtualenv.pypa.io/en/latest/>`_,
|
|
82
|
+
``pip install circup`` should do the trick. This is the simplest way to make it
|
|
83
|
+
work.
|
|
84
|
+
|
|
85
|
+
If you have no idea what a virtualenv is, try the following command,
|
|
86
|
+
``pip3 install --user circup``.
|
|
87
|
+
|
|
88
|
+
.. note::
|
|
89
|
+
|
|
90
|
+
If you use the ``pip3`` command to install CircUp you must make sure that
|
|
91
|
+
your path contains the directory into which the script will be installed.
|
|
92
|
+
To discover this path,
|
|
93
|
+
|
|
94
|
+
* On Unix-like systems, type ``python3 -m site --user-base`` and append
|
|
95
|
+
``bin`` to the resulting path.
|
|
96
|
+
* On Windows, type the same command, but append ``Scripts`` to the
|
|
97
|
+
resulting path.
|
|
98
|
+
|
|
99
|
+
What does Circup Do?
|
|
100
|
+
--------------------
|
|
101
|
+
|
|
102
|
+
Each CircuitPython library on the device usually has a version number as
|
|
103
|
+
metadata within the module.
|
|
104
|
+
|
|
105
|
+
This utility looks at all the libraries on the device and checks if they are
|
|
106
|
+
the most recent (compared to the versions found in the most recent version of
|
|
107
|
+
the Adafruit CircuitPython Bundle and Circuitpython Community Bundle). If the libraries are out of date, the
|
|
108
|
+
utility helps you update them.
|
|
109
|
+
|
|
110
|
+
The Adafruit CircuitPython Bundle can be found here:
|
|
111
|
+
|
|
112
|
+
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest
|
|
113
|
+
|
|
114
|
+
Full details of these libraries, what they're for and how to get them, can be
|
|
115
|
+
found here:
|
|
116
|
+
|
|
117
|
+
https://circuitpython.org/libraries
|
|
118
|
+
|
|
119
|
+
The Circuitpython Community Bundle can be found here:
|
|
120
|
+
|
|
121
|
+
https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest
|
|
122
|
+
|
|
123
|
+
Usage
|
|
124
|
+
-----
|
|
125
|
+
|
|
126
|
+
If you need more detailed help using Circup see the Learn Guide article
|
|
127
|
+
`"Use CircUp to easily keep your CircuitPython libraries up to date" <https://learn.adafruit.com/keep-your-circuitpython-libraries-on-devices-up-to-date-with-circup/>`_.
|
|
128
|
+
|
|
129
|
+
First, plug in a device running CircuiPython. This should appear as a mounted
|
|
130
|
+
storage device called ``CIRCUITPY``.
|
|
131
|
+
|
|
132
|
+
To get help, just type the command::
|
|
133
|
+
|
|
134
|
+
$ circup
|
|
135
|
+
Usage: circup [OPTIONS] COMMAND [ARGS]...
|
|
136
|
+
|
|
137
|
+
A tool to manage and update libraries on a CircuitPython device.
|
|
138
|
+
|
|
139
|
+
Options:
|
|
140
|
+
--verbose Comprehensive logging is sent to stdout.
|
|
141
|
+
--path DIRECTORY Path to CircuitPython directory. Overrides automatic
|
|
142
|
+
path detection.
|
|
143
|
+
--host TEXT Hostname or IP address of a device. Overrides automatic
|
|
144
|
+
path detection.
|
|
145
|
+
--password TEXT Password to use for authentication when --host is used.
|
|
146
|
+
--timeout INTEGER Specify the timeout in seconds for any network
|
|
147
|
+
operations.
|
|
148
|
+
--board-id TEXT Manual Board ID of the CircuitPython device. If provided
|
|
149
|
+
in combination with --cpy-version, it overrides the
|
|
150
|
+
detected board ID.
|
|
151
|
+
--cpy-version TEXT Manual CircuitPython version. If provided in combination
|
|
152
|
+
with --board-id, it overrides the detected CPy version.
|
|
153
|
+
--version Show the version and exit.
|
|
154
|
+
--help Show this message and exit.
|
|
155
|
+
|
|
156
|
+
Commands:
|
|
157
|
+
bundle-add Add bundles to the local bundles list, by "user/repo"...
|
|
158
|
+
bundle-remove Remove one or more bundles from the local bundles list.
|
|
159
|
+
bundle-show Show the list of bundles, default and local, with URL,...
|
|
160
|
+
example Copy named example(s) from a bundle onto the device.
|
|
161
|
+
freeze Output details of all the modules found on the connected...
|
|
162
|
+
install Install a named module(s) onto the device.
|
|
163
|
+
list Lists all out of date modules found on the connected...
|
|
164
|
+
show Show a list of available modules in the bundle.
|
|
165
|
+
uninstall Uninstall a named module(s) from the connected device.
|
|
166
|
+
update Update modules on the device. Use --all to automatically
|
|
167
|
+
update all modules without Major Version warnings.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
To automatically install all modules imported by ``code.py``,
|
|
172
|
+
:code:`$ circup install --auto`::
|
|
173
|
+
|
|
174
|
+
$ circup install --auto
|
|
175
|
+
Found device at /Volumes/CIRCUITPY, running CircuitPython 7.0.0-alpha.5.
|
|
176
|
+
Searching for dependencies for: ['adafruit_bmp280']
|
|
177
|
+
Ready to install: ['adafruit_bmp280', 'adafruit_bus_device', 'adafruit_register']
|
|
178
|
+
|
|
179
|
+
Installed 'adafruit_bmp280'.
|
|
180
|
+
Installed 'adafruit_bus_device'.
|
|
181
|
+
Installed 'adafruit_register'.
|
|
182
|
+
|
|
183
|
+
To search for a specific module containing the name bme:
|
|
184
|
+
:code:`$ circup show bme`::
|
|
185
|
+
|
|
186
|
+
$ circup show bme
|
|
187
|
+
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.1.0-beta.2.
|
|
188
|
+
adafruit_bme280
|
|
189
|
+
adafruit_bme680
|
|
190
|
+
2 shown of 257 packages.
|
|
191
|
+
|
|
192
|
+
To show version information for all the modules currently on a connected
|
|
193
|
+
CIRCUITPYTHON device::
|
|
194
|
+
|
|
195
|
+
$ circup freeze
|
|
196
|
+
adafruit_binascii==v1.0
|
|
197
|
+
adafruit_bme280==2.3.1
|
|
198
|
+
adafruit_ble==1.0.2
|
|
199
|
+
|
|
200
|
+
With :code:`$ circup freeze -r`, Circup will save, in the current working directory,
|
|
201
|
+
a requirements.txt file with a list of all modules currently installed on the
|
|
202
|
+
connected device.
|
|
203
|
+
|
|
204
|
+
To list all the modules that require an update::
|
|
205
|
+
|
|
206
|
+
$ circup list
|
|
207
|
+
The following modules are out of date or probably need an update.
|
|
208
|
+
|
|
209
|
+
Module Version Latest
|
|
210
|
+
------------------ -------- --------
|
|
211
|
+
adafruit_binascii v1.0 1.0.1
|
|
212
|
+
adafruit_ble 1.0.2 4.0
|
|
213
|
+
|
|
214
|
+
To interactively update the out-of-date modules::
|
|
215
|
+
|
|
216
|
+
$ circup update
|
|
217
|
+
Found 3 module[s] needing update.
|
|
218
|
+
Please indicate which modules you wish to update:
|
|
219
|
+
|
|
220
|
+
Update 'adafruit_binascii'? [y/N]: Y
|
|
221
|
+
OK
|
|
222
|
+
Update 'adafruit_ble'? [y/N]: Y
|
|
223
|
+
OK
|
|
224
|
+
|
|
225
|
+
Install a module or modules onto the connected device with::
|
|
226
|
+
|
|
227
|
+
$ circup install adafruit_thermal_printer
|
|
228
|
+
Installed 'adafruit_thermal_printer'.
|
|
229
|
+
|
|
230
|
+
$ circup install adafruit_thermal_printer adafruit_bus_io
|
|
231
|
+
Installed 'adafruit_thermal_printer'.
|
|
232
|
+
Installed 'adafruit_bus_io'.
|
|
233
|
+
|
|
234
|
+
If you need to work with the original .py version of a module, use the --py
|
|
235
|
+
flag.
|
|
236
|
+
|
|
237
|
+
$ circup install --py adafruit_thermal_printer
|
|
238
|
+
Installed 'adafruit_thermal_printer'.
|
|
239
|
+
|
|
240
|
+
You can also install a list of modules from a requirements.txt file in
|
|
241
|
+
the current working directory with::
|
|
242
|
+
|
|
243
|
+
$ circup install -r requirements.txt
|
|
244
|
+
Installed 'adafruit_bmp280'.
|
|
245
|
+
Installed 'adafruit_lis3mdl'.
|
|
246
|
+
Installed 'adafruit_lsm6ds'.
|
|
247
|
+
Installed 'adafruit_sht31d'.
|
|
248
|
+
Installed 'neopixel'.
|
|
249
|
+
|
|
250
|
+
Uninstall a module or modules like this::
|
|
251
|
+
|
|
252
|
+
$ circup uninstall adafruit_thermal_printer
|
|
253
|
+
Uninstalled 'adafruit_thermal_printer'.
|
|
254
|
+
|
|
255
|
+
$ circup uninstall adafruit_thermal_printer adafruit_bus_io
|
|
256
|
+
Uninstalled 'adafruit_thermal_printer'.
|
|
257
|
+
Uninstalled 'adafruit_bus_io'.
|
|
258
|
+
|
|
259
|
+
Use the ``--verbose`` flag to see the logs as the command is working::
|
|
260
|
+
|
|
261
|
+
$ circup --verbose freeze
|
|
262
|
+
Logging to /home/ntoll/.cache/circup/log/circup.log
|
|
263
|
+
|
|
264
|
+
10/18/2020 00:54:43 INFO: ### Started Circup ###
|
|
265
|
+
10/18/2020 00:54:43 INFO: Found device: /Volumes/CIRCUITPY
|
|
266
|
+
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.0.0-alpha.1-1352-gf0b37313c.
|
|
267
|
+
10/18/2020 00:54:44 INFO: Freeze
|
|
268
|
+
10/18/2020 00:54:44 INFO: Found device: /Volumes/CIRCUITPY
|
|
269
|
+
... etc ...
|
|
270
|
+
|
|
271
|
+
The ``--path`` flag let's you pass in a different path to the CircuitPython
|
|
272
|
+
mounted volume. This is helpful when you have renamed or have more than one
|
|
273
|
+
CircuitPython devices attached::
|
|
274
|
+
|
|
275
|
+
$ circup --path /run/media/user/CIRCUITPY1 list
|
|
276
|
+
|
|
277
|
+
The ``--version`` flag will tell you the current version of the
|
|
278
|
+
``circup`` command itself::
|
|
279
|
+
|
|
280
|
+
$ circup --version
|
|
281
|
+
CircUp, A CircuitPython module updater. Version 0.0.1
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
To use circup via the `Web Workflow <https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor>`_. on devices that support it. Use the ``--host`` and ``--password`` arguments before your circup command.::
|
|
285
|
+
|
|
286
|
+
$ circup --host 192.168.1.119 --password s3cr3t install adafruit_hid
|
|
287
|
+
$ circup --host cpy-9573b2.local --password s3cr3t install adafruit_hid
|
|
288
|
+
|
|
289
|
+
That's it!
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
Library Name Autocomplete
|
|
293
|
+
-------------------------
|
|
294
|
+
|
|
295
|
+
When enabled, circup will autocomplete library names, simliar to other command line tools.
|
|
296
|
+
|
|
297
|
+
For example:
|
|
298
|
+
|
|
299
|
+
``circup install n`` + tab -``circup install neopixel`` (+tab: offers ``neopixel`` and ``neopixel_spi`` completions)
|
|
300
|
+
|
|
301
|
+
``circup install a`` + tab -``circup install adafruit\_`` + m a g + tab -``circup install adafruit_magtag``
|
|
302
|
+
|
|
303
|
+
How to Activate Library Name Autocomplete
|
|
304
|
+
-----------------------------------------
|
|
305
|
+
|
|
306
|
+
In order to activate shell completion, you need to inform your shell that completion is available for your script. Any Click application automatically provides support for that.
|
|
307
|
+
|
|
308
|
+
For Bash, add this to ~/.bashrc::
|
|
309
|
+
|
|
310
|
+
eval "$(_CIRCUP_COMPLETE=bash_source circup)"
|
|
311
|
+
|
|
312
|
+
For Zsh, add this to ~/.zshrc::
|
|
313
|
+
|
|
314
|
+
eval "$(_CIRCUP_COMPLETE=zsh_source circup)"
|
|
315
|
+
|
|
316
|
+
For Fish, add this to ~/.config/fish/completions/foo-bar.fish::
|
|
317
|
+
|
|
318
|
+
eval (env _CIRCUP_COMPLETE=fish_source circup)
|
|
319
|
+
|
|
320
|
+
Open a new shell to enable completion. Or run the eval command directly in your current shell to enable it temporarily.
|
|
321
|
+
### Activation Script
|
|
322
|
+
|
|
323
|
+
The above eval examples will invoke your application every time a shell is started. This may slow down shell startup time significantly.
|
|
324
|
+
|
|
325
|
+
Alternatively, export the generated completion code as a static script to be executed. You can ship this file with your builds; tools like Git do this. At least Zsh will also cache the results of completion files, but not eval scripts.
|
|
326
|
+
|
|
327
|
+
For Bash::
|
|
328
|
+
|
|
329
|
+
_CIRCUP_COMPLETE=bash_source circup circup-complete.sh
|
|
330
|
+
|
|
331
|
+
For Zsh::
|
|
332
|
+
|
|
333
|
+
_CIRCUP_COMPLETE=zsh_source circup circup-complete.sh
|
|
334
|
+
|
|
335
|
+
For Fish::
|
|
336
|
+
|
|
337
|
+
_CIRCUP_COMPLETE=fish_source circup circup-complete.sh
|
|
338
|
+
|
|
339
|
+
In .bashrc or .zshrc, source the script instead of the eval command::
|
|
340
|
+
|
|
341
|
+
. /path/to/circup-complete.sh
|
|
342
|
+
|
|
343
|
+
For Fish, add the file to the completions directory::
|
|
344
|
+
|
|
345
|
+
_CIRCUP_COMPLETE=fish_source circup ~/.config/fish/completions/circup-complete.fish
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
.. note::
|
|
349
|
+
|
|
350
|
+
If you find a bug, or you want to suggest an enhancement or new feature
|
|
351
|
+
feel free to create an issue or submit a pull request here:
|
|
352
|
+
|
|
353
|
+
https://github.com/adafruit/circup
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
Discussion of this tool happens on the Adafruit CircuitPython
|
|
357
|
+
`Discord channel <https://discord.gg/rqrKDjU>`_.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
circup/__init__.py,sha256=VZqTFEKpNsEVAV7QimHTQLG1itDhj2U7IZ-HXlJbZpU,662
|
|
2
|
+
circup/backends.py,sha256=Q_gOlWgy6hHrPaLvUxQtFbLH85LMWzqXm1u_1H7b3L8,36227
|
|
3
|
+
circup/bundle.py,sha256=FEP4F470aJtwmm8jgTM3DgR3dj5SVwbX1tbyIRKVHn8,5327
|
|
4
|
+
circup/command_utils.py,sha256=8yc5fYHb50unKw9xA5V7yE5rBKD_0-gcSWdAE1TrURc,22566
|
|
5
|
+
circup/commands.py,sha256=WV1tsZ41M-cFSloL7OhAHUJp338u4sx0OqJb13nELXc,26367
|
|
6
|
+
circup/logging.py,sha256=hu4v8ljkXo8ru-cqs0W3PU-xEVvTO_qqMKDJM18OXbQ,1115
|
|
7
|
+
circup/module.py,sha256=33_kdy5BZn6COyIjAFZMpw00rTtPiryQZWFXQkMF8FY,7435
|
|
8
|
+
circup/shared.py,sha256=VkNI4DVX6z0tWLRAbSInXnamn96sFXLyXY8SKo_Nk7M,8729
|
|
9
|
+
circup/config/bundle_config.json,sha256=oOJ3Rv-e008IhrRWwqIC3pEtyDsWe5_a4PGqzJOCHhk,202
|
|
10
|
+
circup/config/bundle_config.json.license,sha256=OOHNqDsViGFhmG9z8J0o98hYmub1CkYKiZB96Php6KE,80
|
|
11
|
+
circup-2.0.1.dist-info/LICENSE,sha256=bVlIMmSL_pqLCqae4hzixy9pYXD808IbgsMoQXTNLBk,1076
|
|
12
|
+
circup-2.0.1.dist-info/METADATA,sha256=vTbIAq_jXFdH0Mi0gBemEp5r23GgNApbz3rx-UZ5ZPU,13193
|
|
13
|
+
circup-2.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
14
|
+
circup-2.0.1.dist-info/entry_points.txt,sha256=ppjKryNpv506fx84V8oHrl4uf_mIYtaBYMC77jRmX2I,39
|
|
15
|
+
circup-2.0.1.dist-info/top_level.txt,sha256=Qx6E0eZgSBE10ciNKsLZx8-TTy_9fEVZh7NLmn24KcU,7
|
|
16
|
+
circup-2.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
circup
|