littlefs-python 0.11.0__tar.gz → 0.12.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.
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.github/workflows/deploy.yml +3 -2
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.github/workflows/run-tests.yml +2 -2
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/PKG-INFO +4 -4
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/README.rst +3 -3
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/__init__.py +11 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/__main__.py +36 -1
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/lfs.c +1325 -1139
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/lfs.pxd +1 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/lfs.pyi +1 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/lfs.pyx +2 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/PKG-INFO +4 -4
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.gitattributes +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.github/dependabot.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.gitignore +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.gitmodules +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.pre-commit-config.yaml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/.readthedocs.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/LICENSE +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/MANIFEST.in +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/ci/build-wheels.sh +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/ci/download_release_files.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/Makefile +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/api/index.rst +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/cli.rst +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/conf.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/doc8.ini +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/examples/index.rst +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/index.rst +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/make.bat +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/requirements.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/docs/usage.rst +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/examples/mkfsimg.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/examples/walk.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.git +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.gitattributes +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.github/workflows/post-release.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.github/workflows/release.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.github/workflows/status.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.github/workflows/test.yml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/.gitignore +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/DESIGN.md +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/LICENSE.md +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/Makefile +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/README.md +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/SPEC.md +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_emubd.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_emubd.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_filebd.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_filebd.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_rambd.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/bd/lfs_rambd.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/benches/bench_dir.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/benches/bench_file.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/benches/bench_superblock.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/lfs.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/lfs.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/lfs_util.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/lfs_util.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/runners/bench_runner.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/runners/bench_runner.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/runners/test_runner.c +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/runners/test_runner.h +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/bench.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/changeprefix.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/code.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/cov.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/data.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/perf.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/perfbd.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/plot.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/plotmpl.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/prettyasserts.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/readblock.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/readmdir.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/readtree.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/stack.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/structs.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/summary.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/tailpipe.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/teepipe.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/test.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/tracebd.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/scripts/watch.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_alloc.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_attrs.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_badblocks.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_bd.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_compat.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_dirs.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_entries.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_evil.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_exhaustion.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_files.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_interspersed.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_move.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_orphans.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_paths.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_powerloss.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_relocations.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_seek.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_superblocks.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/littlefs/tests/test_truncate.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/mypy.ini +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/pyproject.toml +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/requirements.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/setup.cfg +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/setup.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/context.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/errors.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs/py.typed +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/SOURCES.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/dependency_links.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/entry_points.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/not-zip-safe +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/requires.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/src/littlefs_python.egg-info/top_level.txt +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/lfs/conftest.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/lfs/test_dir_functions.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/lfs/test_file_functions.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/lfs/test_fs_functions.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_attr.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_block_count.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_directories.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_files.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_grow.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_multiversion.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_name_max.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_remove_rename.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_version.py +0 -0
- {littlefs_python-0.11.0 → littlefs_python-0.12.0}/test/test_walk.py +0 -0
|
@@ -11,7 +11,8 @@ jobs:
|
|
|
11
11
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
12
12
|
|
|
13
13
|
env:
|
|
14
|
-
|
|
14
|
+
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* pp37-* pp38-* pp39-* pp310-*"
|
|
15
|
+
CIBW_SKIP: "cp36-* pp* *-win_arm64 *-musllinux_aarch64"
|
|
15
16
|
CIBW_ARCHS_LINUX: "x86_64 i686 aarch64"
|
|
16
17
|
|
|
17
18
|
steps:
|
|
@@ -49,7 +50,7 @@ jobs:
|
|
|
49
50
|
uses: pypa/cibuildwheel@v2.19.1
|
|
50
51
|
env:
|
|
51
52
|
CIBW_BUILD: ${{ matrix.cibw_build }}
|
|
52
|
-
CIBW_SKIP: "cp36-*
|
|
53
|
+
CIBW_SKIP: "cp36-* pp*"
|
|
53
54
|
CIBW_ARCHS: ${{ matrix.cibw_archs }}
|
|
54
55
|
CIBW_REPAIR_WHEEL_COMMAND: |
|
|
55
56
|
echo "Target delocate archs: {delocate_archs}"
|
|
@@ -14,8 +14,8 @@ jobs:
|
|
|
14
14
|
runs-on: ${{ matrix.os }}
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
os: [ubuntu-latest, macos-
|
|
18
|
-
python-version: [3.8, 3.9, "3.10", "3.11"]
|
|
17
|
+
os: [ubuntu-latest, macos-13, windows-latest]
|
|
18
|
+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
|
|
19
19
|
|
|
20
20
|
steps:
|
|
21
21
|
- uses: actions/checkout@v4
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: littlefs-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: A python wrapper for littlefs
|
|
5
5
|
Home-page: https://github.com/jrast/littlefs-python
|
|
6
6
|
Author: Jürg Rast
|
|
@@ -113,9 +113,9 @@ This is as simple as it can be::
|
|
|
113
113
|
At the moment wheels (which require no build) are provided for the following platforms,
|
|
114
114
|
on other platforms the source package is used and a compiler is required:
|
|
115
115
|
|
|
116
|
-
+ Linux: Python 3.
|
|
117
|
-
+ MacOS: Python 3.
|
|
118
|
-
+ Windows: Python 3.
|
|
116
|
+
+ Linux: Python 3.7 - 3.12 / x86_64, arm64
|
|
117
|
+
+ MacOS: Python 3.7 - 3.12 / x86_64, arm64
|
|
118
|
+
+ Windows: Python 3.7 - 3.12 / 32- & 64-bit
|
|
119
119
|
|
|
120
120
|
CLI
|
|
121
121
|
===
|
|
@@ -89,9 +89,9 @@ This is as simple as it can be::
|
|
|
89
89
|
At the moment wheels (which require no build) are provided for the following platforms,
|
|
90
90
|
on other platforms the source package is used and a compiler is required:
|
|
91
91
|
|
|
92
|
-
+ Linux: Python 3.
|
|
93
|
-
+ MacOS: Python 3.
|
|
94
|
-
+ Windows: Python 3.
|
|
92
|
+
+ Linux: Python 3.7 - 3.12 / x86_64, arm64
|
|
93
|
+
+ MacOS: Python 3.7 - 3.12 / x86_64, arm64
|
|
94
|
+
+ Windows: Python 3.7 - 3.12 / 32- & 64-bit
|
|
95
95
|
|
|
96
96
|
CLI
|
|
97
97
|
===
|
|
@@ -72,6 +72,10 @@ class LittleFS:
|
|
|
72
72
|
def block_count(self) -> int:
|
|
73
73
|
return self.fs.block_count
|
|
74
74
|
|
|
75
|
+
@property
|
|
76
|
+
def used_block_count(self) -> int:
|
|
77
|
+
return lfs.fs_size(self.fs)
|
|
78
|
+
|
|
75
79
|
@property
|
|
76
80
|
def context(self) -> "UserContext":
|
|
77
81
|
"""User context of the file system"""
|
|
@@ -98,6 +102,10 @@ class LittleFS:
|
|
|
98
102
|
return lfs.fs_mkconsistent(self.fs)
|
|
99
103
|
|
|
100
104
|
def fs_grow(self, block_count: int) -> int:
|
|
105
|
+
"""WARNING: does not modify underlying ``self.context``.
|
|
106
|
+
|
|
107
|
+
Must be done externally.
|
|
108
|
+
"""
|
|
101
109
|
if block_count < self.block_count:
|
|
102
110
|
raise ValueError(
|
|
103
111
|
f"Supplied block_count='{block_count}' cannot be smaller than current block_count {self.block_count}"
|
|
@@ -109,6 +117,9 @@ class LittleFS:
|
|
|
109
117
|
"""Get the status of the filesystem"""
|
|
110
118
|
return lfs.fs_stat(self.fs)
|
|
111
119
|
|
|
120
|
+
def fs_gc(self):
|
|
121
|
+
return lfs.fs_gc(self.fs)
|
|
122
|
+
|
|
112
123
|
def open(
|
|
113
124
|
self, fname: str, mode="r", buffering: int = -1, encoding: str = None, errors: str = None, newline: str = None
|
|
114
125
|
) -> IO:
|
|
@@ -89,8 +89,33 @@ def create(parser: argparse.ArgumentParser, args: argparse.Namespace) -> int:
|
|
|
89
89
|
with fs.open(rel_path.as_posix(), "wb") as dest:
|
|
90
90
|
dest.write(path.read_bytes())
|
|
91
91
|
|
|
92
|
+
if args.compact:
|
|
93
|
+
if args.verbose:
|
|
94
|
+
print(f"Compacting... {fs.used_block_count} / {args.block_count}")
|
|
95
|
+
compact_fs = LittleFS(
|
|
96
|
+
block_size=args.block_size,
|
|
97
|
+
block_count=fs.used_block_count,
|
|
98
|
+
name_max=args.name_max,
|
|
99
|
+
)
|
|
100
|
+
for root, dirs, files in fs.walk("/"):
|
|
101
|
+
if not root.endswith("/"):
|
|
102
|
+
root += "/"
|
|
103
|
+
for _dir in dirs:
|
|
104
|
+
compact_fs.makedirs(root + _dir, exist_ok=True)
|
|
105
|
+
for file in files:
|
|
106
|
+
path = root + file
|
|
107
|
+
print(path)
|
|
108
|
+
with fs.open(path, "rb") as src, compact_fs.open(path, "wb") as dest:
|
|
109
|
+
dest.write(src.read())
|
|
110
|
+
compact_fs.fs_grow(args.block_count)
|
|
111
|
+
data = compact_fs.context.buffer
|
|
112
|
+
if not args.no_pad:
|
|
113
|
+
data = data.ljust(args.fs_size, b"\xFF")
|
|
114
|
+
else:
|
|
115
|
+
data = fs.context.buffer
|
|
116
|
+
|
|
92
117
|
args.destination.parent.mkdir(exist_ok=True, parents=True)
|
|
93
|
-
args.destination.write_bytes(
|
|
118
|
+
args.destination.write_bytes(data)
|
|
94
119
|
return 0
|
|
95
120
|
|
|
96
121
|
|
|
@@ -219,6 +244,16 @@ def get_parser():
|
|
|
219
244
|
required=True,
|
|
220
245
|
help="LittleFS block size.",
|
|
221
246
|
)
|
|
247
|
+
parser_create.add_argument(
|
|
248
|
+
"--compact",
|
|
249
|
+
action="store_true",
|
|
250
|
+
help="Store all data in the beginning blocks.",
|
|
251
|
+
)
|
|
252
|
+
parser_create.add_argument(
|
|
253
|
+
"--no-pad",
|
|
254
|
+
action="store_true",
|
|
255
|
+
help="Do not pad the binary to-size with 0xFF. Only valid with --compact.",
|
|
256
|
+
)
|
|
222
257
|
block_count_group = parser_create.add_mutually_exclusive_group(required=True)
|
|
223
258
|
block_count_group.add_argument(
|
|
224
259
|
"--block-count",
|