punchboot 2.2.0__tar.gz → 2.7.0__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 (36) hide show
  1. {punchboot-2.2.0 → punchboot-2.7.0}/PKG-INFO +17 -5
  2. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/PKG-INFO +17 -5
  3. {punchboot-2.2.0 → punchboot-2.7.0}/pyproject.toml +22 -11
  4. {punchboot-2.2.0 → punchboot-2.7.0}/setup.py +7 -6
  5. {punchboot-2.2.0 → punchboot-2.7.0}/src/lib/bpak.c +1 -1
  6. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/__init__.py +6 -6
  7. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/__main__.py +198 -181
  8. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/helpers.py +13 -7
  9. punchboot-2.7.0/tools/punchboot/punchboot/partition.py +79 -0
  10. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/session.py +139 -123
  11. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/slc.py +7 -7
  12. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/python_wrapper.c +2 -2
  13. punchboot-2.2.0/tools/punchboot/punchboot/partition.py +0 -59
  14. {punchboot-2.2.0 → punchboot-2.7.0}/LICENSE +0 -0
  15. {punchboot-2.2.0 → punchboot-2.7.0}/README.md +0 -0
  16. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/SOURCES.txt +0 -0
  17. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/dependency_links.txt +0 -0
  18. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/entry_points.txt +0 -0
  19. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/requires.txt +0 -0
  20. {punchboot-2.2.0 → punchboot-2.7.0}/punchboot.egg-info/top_level.txt +0 -0
  21. {punchboot-2.2.0 → punchboot-2.7.0}/setup.cfg +0 -0
  22. {punchboot-2.2.0 → punchboot-2.7.0}/src/wire.c +0 -0
  23. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api.c +0 -0
  24. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_authentication.c +0 -0
  25. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_board.c +0 -0
  26. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_boot.c +0 -0
  27. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_device.c +0 -0
  28. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_misc.c +0 -0
  29. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_partition.c +0 -0
  30. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_slc.c +0 -0
  31. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/api_stream.c +0 -0
  32. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/error.c +0 -0
  33. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/exceptions.c +0 -0
  34. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/punchboot/py.typed +0 -0
  35. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/socket.c +0 -0
  36. {punchboot-2.2.0 → punchboot-2.7.0}/tools/punchboot/usb.c +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: punchboot
3
- Version: 2.2.0
3
+ Version: 2.7.0
4
4
  Summary: Punchboot tools
5
5
  Home-page: https://github.com/jonasblixt/punchboot
6
6
  Author: Jonas Blixt
@@ -11,16 +11,28 @@ Classifier: Intended Audience :: Developers
11
11
  Classifier: Topic :: Software Development :: Embedded Systems
12
12
  Classifier: License :: OSI Approved :: BSD License
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
14
  Classifier: Programming Language :: Python :: 3.10
17
15
  Classifier: Programming Language :: Python :: 3.11
18
16
  Classifier: Programming Language :: Python :: 3.12
19
- Requires-Python: >=3.8
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
+ Requires-Python: >=3.10
20
21
  Description-Content-Type: text/markdown
21
22
  License-File: LICENSE
22
23
  Requires-Dist: semver<4,>=3
23
24
  Requires-Dist: click<9,>=8
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: license
32
+ Dynamic: license-file
33
+ Dynamic: requires-dist
34
+ Dynamic: requires-python
35
+ Dynamic: summary
24
36
 
25
37
  ![PB Logo](doc/pb_logo.png)
26
38
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: punchboot
3
- Version: 2.2.0
3
+ Version: 2.7.0
4
4
  Summary: Punchboot tools
5
5
  Home-page: https://github.com/jonasblixt/punchboot
6
6
  Author: Jonas Blixt
@@ -11,16 +11,28 @@ Classifier: Intended Audience :: Developers
11
11
  Classifier: Topic :: Software Development :: Embedded Systems
12
12
  Classifier: License :: OSI Approved :: BSD License
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
14
  Classifier: Programming Language :: Python :: 3.10
17
15
  Classifier: Programming Language :: Python :: 3.11
18
16
  Classifier: Programming Language :: Python :: 3.12
19
- Requires-Python: >=3.8
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
+ Requires-Python: >=3.10
20
21
  Description-Content-Type: text/markdown
21
22
  License-File: LICENSE
22
23
  Requires-Dist: semver<4,>=3
23
24
  Requires-Dist: click<9,>=8
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: license
32
+ Dynamic: license-file
33
+ Dynamic: requires-dist
34
+ Dynamic: requires-python
35
+ Dynamic: summary
24
36
 
25
37
  ![PB Logo](doc/pb_logo.png)
26
38
 
@@ -3,15 +3,28 @@ line-length = 100
3
3
  extend-exclude = [
4
4
  "pki",
5
5
  "doc",
6
- "scripts/genconfig.py",
7
- "scripts/kconfiglib.py",
8
- "scripts/menuconfig.py",
6
+ "scripts/**",
9
7
  ]
10
- target-version = "py38"
8
+ target-version = "py310"
11
9
 
12
10
  [tool.ruff.lint]
13
11
  # See: https://docs.astral.sh/ruff/rules/ for details
14
- select = ["D", "N", "F", "W", "E", "I", "SIM", "PTH", "PERF"]
12
+ select = ["ALL"]
13
+ ignore = [
14
+ "COM812", # Conflicts with the formatter
15
+ "ISC001", # Conflicts with the formatter
16
+ "PLE0605", # ruff does not handle += in __all__
17
+ "FBT", # don't care for these at the moment
18
+ "CPY001", # Copyright notices are not used in the python sources
19
+ "PT001", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
20
+ "PT023", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
21
+ ]
22
+
23
+ pyupgrade.keep-runtime-typing = true
24
+ pylint.max-args = 8
25
+
26
+ [tool.ruff.lint.pydocstyle]
27
+ convention = "pep257"
15
28
 
16
29
  [tool.ruff.format]
17
30
  quote-style = "double"
@@ -19,19 +32,17 @@ indent-style = "space"
19
32
  skip-magic-trailing-comma = false
20
33
  line-ending = "auto"
21
34
 
22
- [tool.ruff.lint.pydocstyle]
23
- convention = "pep257"
24
-
25
35
  [tool.mypy]
26
36
  warn_return_any = true
27
37
  exclude = [
28
38
  "^build.*",
29
39
  "^doc.*",
30
- "^scripts/menuconfig\\.py$"
40
+ "^scripts/menuconfig\\.py$",
41
+ "^scripts/olddefconfig\\.py$"
31
42
  ]
32
43
 
33
44
  [tool.cibuildwheel]
34
- skip = ["*-musl*", "pp*", "*linux_i686", "*win32*"]
45
+ skip = ["*-musl*", "pp*", "*linux_i686", "*win32*", "cp3??t-*"]
35
46
 
36
47
  [tool.cibuildwheel.linux]
37
48
  before-all = "yum install -y libusbx-devel"
@@ -53,4 +64,4 @@ environment = "PB_MACOS_ARCH=x86_64"
53
64
 
54
65
  [tool.cibuildwheel.macos]
55
66
  archs = ["x86_64", "arm64"]
56
- repair-wheel-command = "DYLD_LIBRARY_PATH=libusb_{delocate_archs}/1.0.26/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
67
+ repair-wheel-command = "DYLD_LIBRARY_PATH=libusb_{delocate_archs}/1.0.27/lib delocate-wheel --require-target-macos-version 12.0 --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
@@ -4,7 +4,7 @@ import os
4
4
  import platform
5
5
  from pathlib import Path
6
6
 
7
- from setuptools import Extension, setup # type: ignore
7
+ from setuptools import Extension, setup # type: ignore # noqa: PGH003
8
8
 
9
9
  pb_base_path: str = "tools/punchboot"
10
10
  plat: str = platform.system()
@@ -20,8 +20,8 @@ elif plat == "Darwin":
20
20
  # get target arch here when cross compiling wheels.
21
21
  _target_arch = os.environ["PB_MACOS_ARCH"]
22
22
  _libraries = ["usb-1.0"]
23
- _library_dirs = [f"libusb_{_target_arch}/1.0.26/lib"]
24
- _include_dirs = ["include", f"libusb_{_target_arch}/1.0.26/include"]
23
+ _library_dirs = [f"libusb_{_target_arch}/1.0.27/lib"]
24
+ _include_dirs = ["include", f"libusb_{_target_arch}/1.0.27/include"]
25
25
  else:
26
26
  _libraries = ["usb-1.0"]
27
27
  _library_dirs = []
@@ -67,11 +67,12 @@ setup(
67
67
  "Topic :: Software Development :: Embedded Systems",
68
68
  "License :: OSI Approved :: BSD License",
69
69
  "Programming Language :: Python :: 3",
70
- "Programming Language :: Python :: 3.8",
71
- "Programming Language :: Python :: 3.9",
72
70
  "Programming Language :: Python :: 3.10",
73
71
  "Programming Language :: Python :: 3.11",
74
72
  "Programming Language :: Python :: 3.12",
73
+ "Programming Language :: Python :: 3.13",
74
+ "Programming Language :: Python :: 3.14",
75
+ "Programming Language :: Python :: 3.15",
75
76
  ],
76
77
  url="https://github.com/jonasblixt/punchboot",
77
78
  packages=["punchboot"],
@@ -81,7 +82,7 @@ setup(
81
82
  package_data={
82
83
  "punchboot": ["py.typed"],
83
84
  },
84
- python_requires=">=3.8",
85
+ python_requires=">=3.10",
85
86
  entry_points={"console_scripts": ["punchboot=punchboot.__main__:cli"]},
86
87
  ext_modules=[
87
88
  Extension(
@@ -11,7 +11,7 @@
11
11
  #include <string.h>
12
12
 
13
13
  /* BPAK_META_ALIGN is a power-of-2 */
14
- #define BPAK_META_ALIGN_SIZE(_x) (((_x) + ((BPAK_META_ALIGN)-1)) & ~((BPAK_META_ALIGN)-1))
14
+ #define BPAK_META_ALIGN_SIZE(_x) (((_x) + ((BPAK_META_ALIGN) - 1)) & ~((BPAK_META_ALIGN) - 1))
15
15
 
16
16
  static int bpak_get_meta_int(struct bpak_header *hdr,
17
17
  bpak_id_t id,
@@ -1,12 +1,12 @@
1
1
  """Punchboot."""
2
2
 
3
- from _punchboot import ( # type: ignore # noqa: F401
3
+ from _punchboot import ( # type: ignore[import-not-found] # noqa: F401
4
4
  ArgumentError,
5
5
  AuthenticationError,
6
6
  CommandError,
7
7
  Error,
8
8
  GenericError,
9
- IOError,
9
+ IOError, # noqa: A004
10
10
  KeyRevokedError,
11
11
  MemError,
12
12
  NoMemoryError,
@@ -17,7 +17,7 @@ from _punchboot import ( # type: ignore # noqa: F401
17
17
  PartVerifyError,
18
18
  SignatureError,
19
19
  StreamNotInitializedError,
20
- TimeoutError,
20
+ TimeoutError, # noqa: A004
21
21
  TransferError,
22
22
  )
23
23
 
@@ -48,13 +48,13 @@ _pb_exceptions = [
48
48
  ]
49
49
 
50
50
  __all__ = [
51
- "Session",
51
+ "SLC",
52
52
  "Partition",
53
53
  "PartitionFlags",
54
- "SLC",
54
+ "Session",
55
55
  "library_version",
56
+ "list_usb_devices",
56
57
  "pb_id",
57
58
  "wait_for_device",
58
- "list_usb_devices",
59
59
  ]
60
60
  __all__ += _pb_exceptions