micropython-stubber 1.17.6__py3-none-any.whl → 1.20.0__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.
- {micropython_stubber-1.17.6.dist-info → micropython_stubber-1.20.0.dist-info}/METADATA +7 -6
- micropython_stubber-1.20.0.dist-info/RECORD +147 -0
- mpflash/README.md +18 -2
- mpflash/libusb_flash.ipynb +203 -0
- mpflash/mpflash/ask_input.py +234 -0
- mpflash/mpflash/cli_download.py +107 -0
- mpflash/mpflash/cli_flash.py +170 -0
- mpflash/mpflash/cli_group.py +40 -7
- mpflash/mpflash/cli_list.py +41 -0
- mpflash/mpflash/cli_main.py +13 -8
- mpflash/mpflash/common.py +33 -121
- mpflash/mpflash/config.py +9 -0
- mpflash/mpflash/{downloader.py → download.py} +110 -96
- mpflash/mpflash/downloaded.py +108 -0
- mpflash/mpflash/errors.py +5 -0
- mpflash/mpflash/flash.py +69 -0
- mpflash/mpflash/flash_esp.py +17 -23
- mpflash/mpflash/flash_stm32.py +16 -113
- mpflash/mpflash/flash_stm32_cube.py +111 -0
- mpflash/mpflash/flash_stm32_dfu.py +101 -0
- mpflash/mpflash/flash_uf2.py +8 -8
- mpflash/mpflash/flash_uf2_linux.py +13 -6
- mpflash/mpflash/flash_uf2_windows.py +24 -12
- mpflash/mpflash/list.py +56 -39
- mpflash/mpflash/logger.py +12 -13
- mpflash/mpflash/mpboard_id/__init__.py +96 -0
- mpflash/mpflash/mpboard_id/board_id.py +63 -0
- mpflash/mpflash/mpboard_id/board_info.csv +2213 -0
- mpflash/mpflash/mpboard_id/board_info.json +19910 -0
- mpflash/mpflash/mpremoteboard/__init__.py +209 -0
- mpflash/mpflash/mpremoteboard/mpy_fw_info.py +141 -0
- {stubber/bulk → mpflash/mpflash/mpremoteboard}/runner.py +19 -4
- mpflash/mpflash/vendor/dfu.py +164 -0
- mpflash/mpflash/vendor/pydfu.py +605 -0
- mpflash/mpflash/vendor/readme.md +3 -0
- mpflash/mpflash/vendor/versions.py +113 -0
- mpflash/mpflash/worklist.py +147 -0
- mpflash/poetry.lock +427 -610
- mpflash/pyproject.toml +22 -6
- mpflash/stm32_udev_rules.md +63 -0
- stubber/__init__.py +1 -1
- stubber/basicgit.py +1 -0
- stubber/board/createstubs.py +11 -4
- stubber/board/createstubs_db.py +11 -5
- stubber/board/createstubs_db_min.py +61 -58
- stubber/board/createstubs_db_mpy.mpy +0 -0
- stubber/board/createstubs_mem.py +11 -5
- stubber/board/createstubs_mem_min.py +56 -53
- stubber/board/createstubs_mem_mpy.mpy +0 -0
- stubber/board/createstubs_min.py +54 -51
- stubber/board/createstubs_mpy.mpy +0 -0
- stubber/board/modulelist.txt +1 -0
- stubber/bulk/mcu_stubber.py +9 -5
- stubber/codemod/_partials/db_main.py +14 -25
- stubber/codemod/_partials/lvgl_main.py +2 -2
- stubber/codemod/board.py +10 -3
- stubber/commands/clone_cmd.py +7 -7
- stubber/commands/config_cmd.py +3 -0
- stubber/commands/{mcu_cmd.py → get_mcu_cmd.py} +20 -3
- stubber/freeze/get_frozen.py +0 -2
- stubber/publish/candidates.py +1 -1
- stubber/publish/package.py +1 -1
- stubber/publish/pathnames.py +1 -1
- stubber/publish/stubpackage.py +1 -0
- stubber/rst/lookup.py +1 -1
- stubber/stubber.py +1 -9
- stubber/tools/manifestfile.py +5 -3
- stubber/update_fallback.py +104 -104
- stubber/utils/config.py +32 -36
- stubber/utils/repos.py +2 -2
- stubber/utils/versions.py +1 -0
- micropython_stubber-1.17.6.dist-info/RECORD +0 -132
- mpflash/mpflash/flasher.py +0 -276
- stubber/bulk/board_id.py +0 -40
- stubber/bulk/mpremoteboard.py +0 -141
- stubber/commands/get_lobo_cmd.py +0 -58
- stubber/commands/minify_cmd.py +0 -60
- stubber/commands/upd_fallback_cmd.py +0 -36
- stubber/commands/upd_module_list_cmd.py +0 -18
- {micropython_stubber-1.17.6.dist-info → micropython_stubber-1.20.0.dist-info}/LICENSE +0 -0
- {micropython_stubber-1.17.6.dist-info → micropython_stubber-1.20.0.dist-info}/WHEEL +0 -0
- {micropython_stubber-1.17.6.dist-info → micropython_stubber-1.20.0.dist-info}/entry_points.txt +0 -0
- /mpflash/mpflash/{uf2_boardid.py → flash_uf2_boardid.py} +0 -0
stubber/commands/minify_cmd.py
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
"""Minify createstubs*.py."""
|
2
|
-
##########################################################################################
|
3
|
-
# minify
|
4
|
-
##########################################################################################
|
5
|
-
from pathlib import Path
|
6
|
-
from typing import Union
|
7
|
-
|
8
|
-
import click
|
9
|
-
from loguru import logger as log
|
10
|
-
from stubber.minify import minify, cross_compile
|
11
|
-
import stubber
|
12
|
-
|
13
|
-
from .cli import stubber_cli
|
14
|
-
|
15
|
-
|
16
|
-
@stubber_cli.command(name="minify")
|
17
|
-
@click.option("--source", "-s", default="createstubs.py", type=click.Path(file_okay=True, dir_okay=False), show_default=True)
|
18
|
-
@click.option("--diff", "-d", help="Show the functional changes made to the source script.", default=False, is_flag=True)
|
19
|
-
@click.option("--compile", "-c", "-xc", "compile", help="Cross compile after minification.", default=False, is_flag=True)
|
20
|
-
@click.option("--all", "-a", help="Minify all variants (normal, _mem and _db).", default=False, is_flag=True)
|
21
|
-
@click.option(
|
22
|
-
"--report/--no-report",
|
23
|
-
"keep_report",
|
24
|
-
help="Keep or disable minimal progress reporting in the minified version.",
|
25
|
-
default=True,
|
26
|
-
show_default=True,
|
27
|
-
)
|
28
|
-
@click.pass_context
|
29
|
-
def cli_minify(
|
30
|
-
ctx: click.Context,
|
31
|
-
source: Union[str, Path],
|
32
|
-
keep_report: bool,
|
33
|
-
diff: bool,
|
34
|
-
compile: bool,
|
35
|
-
all: bool,
|
36
|
-
) -> int:
|
37
|
-
"""
|
38
|
-
Minify createstubs*.py.
|
39
|
-
|
40
|
-
Creates a minified version of the SOURCE micropython file in TARGET (file or folder).
|
41
|
-
The goal is to use less memory / not to run out of memory, while generating MCU stubs.
|
42
|
-
"""
|
43
|
-
if all:
|
44
|
-
sources = ["createstubs.py", "createstubs_mem.py", "createstubs_db.py"]
|
45
|
-
else:
|
46
|
-
sources = [source]
|
47
|
-
log.trace(f"sources: {sources}")
|
48
|
-
for source in sources:
|
49
|
-
# TODO: Check if module resources should not be retrieved via API (e.g. via importlib.resources)
|
50
|
-
src = Path(stubber.__file__).parent / "board" / source
|
51
|
-
dst = src.with_name(src.stem + "_min.py")
|
52
|
-
min_dest = src.with_name(src.stem + "_mpy.mpy")
|
53
|
-
log.info(f"\nMinifying {src}...")
|
54
|
-
minify(src, dst, keep_report, diff)
|
55
|
-
if compile:
|
56
|
-
log.info("Cross compiling...")
|
57
|
-
cross_compile(dst, min_dest)
|
58
|
-
|
59
|
-
log.info("Done!")
|
60
|
-
return 0
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
update-fallback folder with common set of stubs that cater for most of the devices
|
3
|
-
"""
|
4
|
-
|
5
|
-
import click
|
6
|
-
from pathlib import Path
|
7
|
-
from stubber.update_fallback import update_fallback, RELEASED
|
8
|
-
from stubber.utils.config import CONFIG
|
9
|
-
|
10
|
-
from .cli import stubber_cli
|
11
|
-
|
12
|
-
|
13
|
-
@stubber_cli.command(name="update-fallback")
|
14
|
-
@click.option("--version", default=RELEASED, type=str, help="Version number to use", show_default=True)
|
15
|
-
@click.option(
|
16
|
-
"--stub-folder",
|
17
|
-
default=CONFIG.stub_path.as_posix(),
|
18
|
-
type=click.Path(exists=True, file_okay=False, dir_okay=True),
|
19
|
-
help="Destination of the files to be generated.",
|
20
|
-
show_default=True,
|
21
|
-
)
|
22
|
-
def cli_update_fallback(
|
23
|
-
version: str,
|
24
|
-
stub_folder: str = CONFIG.stub_path.as_posix(),
|
25
|
-
):
|
26
|
-
"""
|
27
|
-
Update the fallback stubs.
|
28
|
-
|
29
|
-
The fallback stubs are updated/collated from files of the firmware-stubs, doc-stubs and core-stubs.
|
30
|
-
"""
|
31
|
-
stub_path = Path(stub_folder)
|
32
|
-
update_fallback(
|
33
|
-
stub_path,
|
34
|
-
CONFIG.fallback_path,
|
35
|
-
version=version,
|
36
|
-
)
|
@@ -1,18 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
update-fallback folder with common set of stubs that cater for most of the devices
|
3
|
-
"""
|
4
|
-
|
5
|
-
from stubber.update_module_list import update_module_list as update_module_list
|
6
|
-
|
7
|
-
from .cli import stubber_cli
|
8
|
-
|
9
|
-
|
10
|
-
@stubber_cli.command(
|
11
|
-
name="update-module-list",
|
12
|
-
help="Update the module list based on the information in the data folder",
|
13
|
-
)
|
14
|
-
def cli_update_module_list():
|
15
|
-
"""
|
16
|
-
Update the module list based on the information in the data folder.
|
17
|
-
"""
|
18
|
-
update_module_list()
|
File without changes
|
File without changes
|
{micropython_stubber-1.17.6.dist-info → micropython_stubber-1.20.0.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|