circup 2.0.2__tar.gz → 2.0.3__tar.gz

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.
Files changed (78) hide show
  1. {circup-2.0.2/circup.egg-info → circup-2.0.3}/PKG-INFO +1 -1
  2. {circup-2.0.2 → circup-2.0.3}/circup/commands.py +28 -2
  3. {circup-2.0.2 → circup-2.0.3/circup.egg-info}/PKG-INFO +1 -1
  4. {circup-2.0.2 → circup-2.0.3}/.github/ISSUE_TEMPLATE.md +0 -0
  5. {circup-2.0.2 → circup-2.0.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  6. {circup-2.0.2 → circup-2.0.3}/.github/workflows/build.yml +0 -0
  7. {circup-2.0.2 → circup-2.0.3}/.github/workflows/release.yml +0 -0
  8. {circup-2.0.2 → circup-2.0.3}/.gitignore +0 -0
  9. {circup-2.0.2 → circup-2.0.3}/.isort.cfg +0 -0
  10. {circup-2.0.2 → circup-2.0.3}/.pre-commit-config.yaml +0 -0
  11. {circup-2.0.2 → circup-2.0.3}/.pylintrc +0 -0
  12. {circup-2.0.2 → circup-2.0.3}/CODE_OF_CONDUCT.rst +0 -0
  13. {circup-2.0.2 → circup-2.0.3}/CODE_OF_CONDUCT.rst.license +0 -0
  14. {circup-2.0.2 → circup-2.0.3}/CONTRIBUTING.rst +0 -0
  15. {circup-2.0.2 → circup-2.0.3}/CONTRIBUTING.rst.license +0 -0
  16. {circup-2.0.2 → circup-2.0.3}/LICENSE +0 -0
  17. {circup-2.0.2 → circup-2.0.3}/LICENSES/CC-BY-4.0.txt +0 -0
  18. {circup-2.0.2 → circup-2.0.3}/LICENSES/MIT.txt +0 -0
  19. {circup-2.0.2 → circup-2.0.3}/LICENSES/Unlicense.txt +0 -0
  20. {circup-2.0.2 → circup-2.0.3}/README.rst +0 -0
  21. {circup-2.0.2 → circup-2.0.3}/README.rst.license +0 -0
  22. {circup-2.0.2 → circup-2.0.3}/circup/__init__.py +0 -0
  23. {circup-2.0.2 → circup-2.0.3}/circup/backends.py +0 -0
  24. {circup-2.0.2 → circup-2.0.3}/circup/bundle.py +0 -0
  25. {circup-2.0.2 → circup-2.0.3}/circup/command_utils.py +0 -0
  26. {circup-2.0.2 → circup-2.0.3}/circup/config/bundle_config.json +0 -0
  27. {circup-2.0.2 → circup-2.0.3}/circup/config/bundle_config.json.license +0 -0
  28. {circup-2.0.2 → circup-2.0.3}/circup/logging.py +0 -0
  29. {circup-2.0.2 → circup-2.0.3}/circup/module.py +0 -0
  30. {circup-2.0.2 → circup-2.0.3}/circup/shared.py +0 -0
  31. {circup-2.0.2 → circup-2.0.3}/circup.egg-info/SOURCES.txt +0 -0
  32. {circup-2.0.2 → circup-2.0.3}/circup.egg-info/dependency_links.txt +0 -0
  33. {circup-2.0.2 → circup-2.0.3}/circup.egg-info/entry_points.txt +0 -0
  34. {circup-2.0.2 → circup-2.0.3}/circup.egg-info/requires.txt +0 -0
  35. {circup-2.0.2 → circup-2.0.3}/circup.egg-info/top_level.txt +0 -0
  36. {circup-2.0.2 → circup-2.0.3}/docs/_static/favicon.ico +0 -0
  37. {circup-2.0.2 → circup-2.0.3}/docs/_static/favicon.ico.license +0 -0
  38. {circup-2.0.2 → circup-2.0.3}/docs/conf.py +0 -0
  39. {circup-2.0.2 → circup-2.0.3}/docs/index.rst +0 -0
  40. {circup-2.0.2 → circup-2.0.3}/docs/index.rst.license +0 -0
  41. {circup-2.0.2 → circup-2.0.3}/docs/logo.png +0 -0
  42. {circup-2.0.2 → circup-2.0.3}/docs/logo.png.license +0 -0
  43. {circup-2.0.2 → circup-2.0.3}/optional_requirements.txt +0 -0
  44. {circup-2.0.2 → circup-2.0.3}/optional_requirements.txt.license +0 -0
  45. {circup-2.0.2 → circup-2.0.3}/pyproject.toml +0 -0
  46. {circup-2.0.2 → circup-2.0.3}/readthedocs.yml +0 -0
  47. {circup-2.0.2 → circup-2.0.3}/requirements.txt +0 -0
  48. {circup-2.0.2 → circup-2.0.3}/requirements.txt.license +0 -0
  49. {circup-2.0.2 → circup-2.0.3}/setup.cfg +0 -0
  50. {circup-2.0.2 → circup-2.0.3}/tests/__init__.py +0 -0
  51. {circup-2.0.2 → circup-2.0.3}/tests/bad_module/__init__.py +0 -0
  52. {circup-2.0.2 → circup-2.0.3}/tests/bad_module/my_module.py +0 -0
  53. {circup-2.0.2 → circup-2.0.3}/tests/bad_python.py +0 -0
  54. {circup-2.0.2 → circup-2.0.3}/tests/bundle.json +0 -0
  55. {circup-2.0.2 → circup-2.0.3}/tests/bundle.json.license +0 -0
  56. {circup-2.0.2 → circup-2.0.3}/tests/device.json +0 -0
  57. {circup-2.0.2 → circup-2.0.3}/tests/device.json.license +0 -0
  58. {circup-2.0.2 → circup-2.0.3}/tests/dir_module/__init__.py +0 -0
  59. {circup-2.0.2 → circup-2.0.3}/tests/dir_module/my_module.py +0 -0
  60. {circup-2.0.2 → circup-2.0.3}/tests/import_styles.py +0 -0
  61. {circup-2.0.2 → circup-2.0.3}/tests/local_module.py +0 -0
  62. {circup-2.0.2 → circup-2.0.3}/tests/local_module_cp7.mpy +0 -0
  63. {circup-2.0.2 → circup-2.0.3}/tests/local_module_cp7.mpy.license +0 -0
  64. {circup-2.0.2 → circup-2.0.3}/tests/mock_device/boot_out.txt +0 -0
  65. {circup-2.0.2 → circup-2.0.3}/tests/mock_device/boot_out.txt.license +0 -0
  66. {circup-2.0.2 → circup-2.0.3}/tests/mock_device/lib/adafruit_waveform/.gitkeep +0 -0
  67. {circup-2.0.2 → circup-2.0.3}/tests/mount_exists.txt +0 -0
  68. {circup-2.0.2 → circup-2.0.3}/tests/mount_exists.txt.license +0 -0
  69. {circup-2.0.2 → circup-2.0.3}/tests/mount_missing.txt +0 -0
  70. {circup-2.0.2 → circup-2.0.3}/tests/mount_missing.txt.license +0 -0
  71. {circup-2.0.2 → circup-2.0.3}/tests/remote_module.py +0 -0
  72. {circup-2.0.2 → circup-2.0.3}/tests/test_bundle_config.json +0 -0
  73. {circup-2.0.2 → circup-2.0.3}/tests/test_bundle_config.json.license +0 -0
  74. {circup-2.0.2 → circup-2.0.3}/tests/test_bundle_config_local.json +0 -0
  75. {circup-2.0.2 → circup-2.0.3}/tests/test_bundle_config_local.json.license +0 -0
  76. {circup-2.0.2 → circup-2.0.3}/tests/test_circup.py +0 -0
  77. {circup-2.0.2 → circup-2.0.3}/tests/test_module.mpy +0 -0
  78. {circup-2.0.2 → circup-2.0.3}/tests/test_module.mpy.license +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: circup
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: A tool to manage/update libraries on CircuitPython devices.
5
5
  Author-email: Adafruit Industries <circuitpython@adafruit.com>
6
6
  License: MIT License
@@ -11,6 +11,7 @@ and the respective Backends which *are* tested. Most of the logic of the followi
11
11
  functions is to prepare things for presentation to / interaction with the user.
12
12
  """
13
13
  import os
14
+ import subprocess
14
15
  import time
15
16
  import sys
16
17
  import re
@@ -304,6 +305,12 @@ def list_cli(ctx): # pragma: no cover
304
305
  @click.option(
305
306
  "--upgrade", "-U", is_flag=True, help="Upgrade modules that are already installed."
306
307
  )
308
+ @click.option(
309
+ "--stubs",
310
+ "-s",
311
+ is_flag=True,
312
+ help="Install stubs module from PyPi for context in IDE.",
313
+ )
307
314
  @click.option(
308
315
  "--auto-file",
309
316
  default=None,
@@ -312,7 +319,7 @@ def list_cli(ctx): # pragma: no cover
312
319
  )
313
320
  @click.pass_context
314
321
  def install(
315
- ctx, modules, pyext, requirement, auto, auto_file, upgrade=False
322
+ ctx, modules, pyext, requirement, auto, auto_file, upgrade=False, stubs=False
316
323
  ): # pragma: no cover
317
324
  """
318
325
  Install a named module(s) onto the device. Multiple modules
@@ -320,6 +327,7 @@ def install(
320
327
  separated by a space. Modules can be from a Bundle or local filepaths.
321
328
  """
322
329
 
330
+ # pylint: disable=too-many-branches
323
331
  # TODO: Ensure there's enough space on the device
324
332
  available_modules = get_bundle_versions(get_bundles_list())
325
333
  mod_names = {}
@@ -373,6 +381,24 @@ def install(
373
381
  upgrade,
374
382
  )
375
383
 
384
+ if stubs:
385
+ library_stubs = "adafruit-circuitpython-{}".format(
386
+ library.replace("adafruit_", "")
387
+ )
388
+ try:
389
+ output = subprocess.check_output(["pip", "install", library_stubs])
390
+ if (
391
+ f"Requirement already satisfied: {library_stubs}"
392
+ in output.decode()
393
+ ):
394
+ click.echo(f"'{library}' stubs already installed.")
395
+ else:
396
+ click.echo(f"Installed '{library}' stubs.")
397
+ except subprocess.CalledProcessError:
398
+ click.secho(
399
+ f"Could not install stubs module {library_stubs}", fg="yellow"
400
+ )
401
+
376
402
 
377
403
  @main.command()
378
404
  @click.option("--overwrite", is_flag=True, help="Overwrite the file if it exists.")
@@ -697,7 +723,7 @@ def bundle_remove(bundle, reset):
697
723
  bundles_local_dict = get_bundles_local_dict()
698
724
  modified = False
699
725
  for bun in bundle:
700
- # cleanup in case seombody pastes the URL to the repo/releases
726
+ # cleanup in case somebody pastes the URL to the repo/releases
701
727
  bun = re.sub(r"https?://github.com/([^/]+/[^/]+)(/.*)?", r"\1", bun)
702
728
  found = False
703
729
  for name, repo in list(bundles_local_dict.items()):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: circup
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: A tool to manage/update libraries on CircuitPython devices.
5
5
  Author-email: Adafruit Industries <circuitpython@adafruit.com>
6
6
  License: MIT License
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes