littlefs-python 0.19.0__tar.gz → 0.19.1__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 (144) hide show
  1. littlefs_python-0.19.1/.github/workflows/abi3.yml +42 -0
  2. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.github/workflows/deploy.yml +3 -3
  3. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.github/workflows/run-tests.yml +1 -1
  4. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/PKG-INFO +7 -1
  5. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/README.rst +6 -0
  6. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/setup.py +21 -1
  7. littlefs_python-0.19.1/src/littlefs/lfs.c +27863 -0
  8. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/lfs.pyx +12 -4
  9. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/PKG-INFO +7 -1
  10. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/SOURCES.txt +1 -0
  11. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/scm_file_list.json +1 -0
  12. littlefs_python-0.19.1/src/littlefs_python.egg-info/scm_version.json +8 -0
  13. littlefs_python-0.19.1/test/test_attr.py +57 -0
  14. littlefs_python-0.19.0/src/littlefs/lfs.c +0 -42316
  15. littlefs_python-0.19.0/src/littlefs_python.egg-info/scm_version.json +0 -8
  16. littlefs_python-0.19.0/test/test_attr.py +0 -26
  17. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.gitattributes +0 -0
  18. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.github/dependabot.yml +0 -0
  19. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.gitignore +0 -0
  20. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.gitmodules +0 -0
  21. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.pre-commit-config.yaml +0 -0
  22. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/.readthedocs.yml +0 -0
  23. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/LICENSE +0 -0
  24. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/MANIFEST.in +0 -0
  25. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/ci/build-wheels.sh +0 -0
  26. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/ci/download_release_files.py +0 -0
  27. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/Makefile +0 -0
  28. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/api/index.rst +0 -0
  29. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/cli.rst +0 -0
  30. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/conf.py +0 -0
  31. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/doc8.ini +0 -0
  32. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/examples/index.rst +0 -0
  33. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/index.rst +0 -0
  34. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/make.bat +0 -0
  35. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/requirements.txt +0 -0
  36. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/docs/usage.rst +0 -0
  37. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/examples/mkfsimg.py +0 -0
  38. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/examples/walk.py +0 -0
  39. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.git +0 -0
  40. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.gitattributes +0 -0
  41. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.github/workflows/post-release.yml +0 -0
  42. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.github/workflows/release.yml +0 -0
  43. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.github/workflows/status.yml +0 -0
  44. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.github/workflows/test.yml +0 -0
  45. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/.gitignore +0 -0
  46. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/DESIGN.md +0 -0
  47. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/LICENSE.md +0 -0
  48. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/Makefile +0 -0
  49. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/README.md +0 -0
  50. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/SPEC.md +0 -0
  51. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_emubd.c +0 -0
  52. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_emubd.h +0 -0
  53. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_filebd.c +0 -0
  54. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_filebd.h +0 -0
  55. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_rambd.c +0 -0
  56. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/bd/lfs_rambd.h +0 -0
  57. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/benches/bench_dir.toml +0 -0
  58. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/benches/bench_file.toml +0 -0
  59. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/benches/bench_superblock.toml +0 -0
  60. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/lfs.c +0 -0
  61. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/lfs.h +0 -0
  62. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/lfs_util.c +0 -0
  63. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/lfs_util.h +0 -0
  64. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/runners/bench_runner.c +0 -0
  65. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/runners/bench_runner.h +0 -0
  66. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/runners/test_runner.c +0 -0
  67. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/runners/test_runner.h +0 -0
  68. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/bench.py +0 -0
  69. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/changeprefix.py +0 -0
  70. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/code.py +0 -0
  71. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/cov.py +0 -0
  72. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/data.py +0 -0
  73. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/perf.py +0 -0
  74. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/perfbd.py +0 -0
  75. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/plot.py +0 -0
  76. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/plotmpl.py +0 -0
  77. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/prettyasserts.py +0 -0
  78. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/readblock.py +0 -0
  79. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/readmdir.py +0 -0
  80. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/readtree.py +0 -0
  81. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/stack.py +0 -0
  82. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/structs.py +0 -0
  83. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/summary.py +0 -0
  84. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/tailpipe.py +0 -0
  85. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/teepipe.py +0 -0
  86. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/test.py +0 -0
  87. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/tracebd.py +0 -0
  88. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/scripts/watch.py +0 -0
  89. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_alloc.toml +0 -0
  90. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_attrs.toml +0 -0
  91. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_badblocks.toml +0 -0
  92. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_bd.toml +0 -0
  93. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_compat.toml +0 -0
  94. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_dirs.toml +0 -0
  95. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_entries.toml +0 -0
  96. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_evil.toml +0 -0
  97. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_exhaustion.toml +0 -0
  98. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_files.toml +0 -0
  99. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_interspersed.toml +0 -0
  100. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_move.toml +0 -0
  101. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_orphans.toml +0 -0
  102. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_paths.toml +0 -0
  103. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_powerloss.toml +0 -0
  104. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_relocations.toml +0 -0
  105. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_seek.toml +0 -0
  106. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_shrink.toml +0 -0
  107. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_superblocks.toml +0 -0
  108. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/littlefs/tests/test_truncate.toml +0 -0
  109. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/mypy.ini +0 -0
  110. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/pyproject.toml +0 -0
  111. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/requirements.txt +0 -0
  112. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/setup.cfg +0 -0
  113. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/__init__.py +0 -0
  114. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/__main__.py +0 -0
  115. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/context.py +0 -0
  116. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/errors.py +0 -0
  117. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/lfs.pxd +0 -0
  118. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/lfs.pyi +0 -0
  119. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/py.typed +0 -0
  120. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs/repl.py +0 -0
  121. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/dependency_links.txt +0 -0
  122. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/entry_points.txt +0 -0
  123. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/not-zip-safe +0 -0
  124. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/requires.txt +0 -0
  125. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/src/littlefs_python.egg-info/top_level.txt +0 -0
  126. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/cli/test_create_and_extract.py +0 -0
  127. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/cli/test_create_and_repl.py +0 -0
  128. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/cli/test_walk_all.py +0 -0
  129. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/lfs/conftest.py +0 -0
  130. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/lfs/test_dir_functions.py +0 -0
  131. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/lfs/test_file_functions.py +0 -0
  132. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/lfs/test_fs_functions.py +0 -0
  133. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_block_count.py +0 -0
  134. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_context.py +0 -0
  135. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_directories.py +0 -0
  136. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_files.py +0 -0
  137. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_grow.py +0 -0
  138. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_multiversion.py +0 -0
  139. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_name_max.py +0 -0
  140. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_remove_rename.py +0 -0
  141. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_unicode_filenames.py +0 -0
  142. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_version.py +0 -0
  143. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_walk.py +0 -0
  144. {littlefs_python-0.19.0 → littlefs_python-0.19.1}/test/test_windisk_context.py +0 -0
@@ -0,0 +1,42 @@
1
+ # Builds the stable-ABI (abi3) wheel on the oldest Python it supports and runs the tests with it. Anything
2
+ # the extension uses outside that version's limited API (e.g. a typed memoryview, which needs Py_buffer
3
+ # before Python 3.11) fails here, at compile or at import. Later Pythons are covered by the stable ABI's own
4
+ # guarantee.
5
+
6
+ name: abi3
7
+
8
+ on:
9
+ push:
10
+ branches: [master]
11
+ pull_request:
12
+ branches: [master]
13
+
14
+ env:
15
+ LIMITED_API: "3.9"
16
+
17
+ jobs:
18
+ abi3:
19
+ runs-on: ubuntu-22.04
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ with:
23
+ submodules: "recursive"
24
+ fetch-depth: 0
25
+ - name: Set up Python ${{ env.LIMITED_API }}
26
+ uses: actions/setup-python@v7
27
+ with:
28
+ python-version: ${{ env.LIMITED_API }}
29
+ - name: Build the abi3 wheel
30
+ env:
31
+ LITTLEFS_PY_LIMITED_API: ${{ env.LIMITED_API }}
32
+ run: |
33
+ python -m pip install --upgrade pip build
34
+ python -m build --wheel
35
+ - name: Install the abi3 wheel
36
+ run: |
37
+ pip install -r requirements.txt
38
+ pip install dist/*-abi3-*.whl
39
+ python -c "import littlefs.lfs as m; assert m.__file__.endswith('.abi3.so'), m.__file__; print(m.__file__)"
40
+ - name: Test with pytest
41
+ run: |
42
+ pytest
@@ -102,7 +102,7 @@ jobs:
102
102
  CIBW_ARCHS_WINDOWS: "ARM64"
103
103
 
104
104
  steps:
105
- - uses: actions/checkout@v6
105
+ - uses: actions/checkout@v7
106
106
  with:
107
107
  submodules: "recursive"
108
108
  fetch-depth: 0
@@ -110,7 +110,7 @@ jobs:
110
110
  - name: Build wheels
111
111
  uses: pypa/cibuildwheel@v3.4.1
112
112
 
113
- - uses: actions/upload-artifact@v6
113
+ - uses: actions/upload-artifact@v7
114
114
  with:
115
115
  name: wheels-windows-arm64
116
116
  path: ./wheelhouse/*.whl
@@ -145,7 +145,7 @@ jobs:
145
145
  pattern: wheels-*
146
146
  merge-multiple: true
147
147
 
148
- - uses: pypa/gh-action-pypi-publish@v1.14.0
148
+ - uses: pypa/gh-action-pypi-publish@v1.14.3
149
149
  with:
150
150
  user: __token__
151
151
  password: ${{ secrets.pypi_api_token }}
@@ -30,7 +30,7 @@ jobs:
30
30
  with:
31
31
  submodules: "recursive"
32
32
  - name: Set up Python ${{ matrix.python-version }}
33
- uses: actions/setup-python@v6
33
+ uses: actions/setup-python@v7
34
34
  with:
35
35
  python-version: ${{ matrix.python-version }}
36
36
  - name: Install dependencies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: littlefs-python
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: A python wrapper for littlefs
5
5
  Home-page: https://github.com/jrast/littlefs-python
6
6
  Author: Jürg Rast
@@ -202,6 +202,12 @@ the package::
202
202
 
203
203
  It's highly recommended to install the package in a virtual environment!
204
204
 
205
+ To build one wheel against the CPython stable ABI (abi3), which runs on the
206
+ given Python version and every later one, set ``LITTLEFS_PY_LIMITED_API``
207
+ (3.9 or later; needs Cython 3.1 or later)::
208
+
209
+ LITTLEFS_PY_LIMITED_API=3.9 python -m build --wheel
210
+
205
211
  Development Hints
206
212
  -----------------
207
213
 
@@ -169,6 +169,12 @@ the package::
169
169
 
170
170
  It's highly recommended to install the package in a virtual environment!
171
171
 
172
+ To build one wheel against the CPython stable ABI (abi3), which runs on the
173
+ given Python version and every later one, set ``LITTLEFS_PY_LIMITED_API``
174
+ (3.9 or later; needs Cython 3.1 or later)::
175
+
176
+ LITTLEFS_PY_LIMITED_API=3.9 python -m build --wheel
177
+
172
178
  Development Hints
173
179
  -----------------
174
180
 
@@ -1,8 +1,25 @@
1
+ import os
1
2
  from os import path
2
3
  from setuptools import setup, find_packages
3
4
  from setuptools import Extension
5
+ import Cython
4
6
  from Cython.Build import cythonize
5
7
 
8
+ # Opt-in stable-ABI (abi3) build: LITTLEFS_PY_LIMITED_API=3.9 builds one extension that runs on CPython 3.9
9
+ # and every later version. Unset, the extension is built for the running Python only.
10
+ LIMITED_API = os.environ.get("LITTLEFS_PY_LIMITED_API")
11
+ LIMITED_API_MACROS = []
12
+ LIMITED_API_OPTIONS = {}
13
+ if LIMITED_API:
14
+ major, minor = (int(part) for part in LIMITED_API.split("."))
15
+ if (major, minor) < (3, 9):
16
+ raise SystemExit("LITTLEFS_PY_LIMITED_API must be 3.9 or later, got %s" % LIMITED_API)
17
+ cython_version = tuple(int(part) for part in Cython.__version__.split(".")[:2])
18
+ if cython_version < (3, 1):
19
+ raise SystemExit("An abi3 build needs Cython 3.1 or later, found %s" % Cython.__version__)
20
+ LIMITED_API_MACROS = [("Py_LIMITED_API", "0x%02X%02X0000" % (major, minor))]
21
+ LIMITED_API_OPTIONS = {"bdist_wheel": {"py_limited_api": "cp%d%d" % (major, minor)}}
22
+
6
23
  # Extension definition
7
24
  EXTENSIONS = [
8
25
  Extension(
@@ -16,8 +33,10 @@ EXTENSIONS = [
16
33
  ("LFS_MULTIVERSION", "1"),
17
34
  ("LFS_NAME_MAX", "1022"), # LittleFS limitation: must be <= 1022
18
35
  # ('LFS_YES_TRACE', '1')
19
- ],
36
+ ]
37
+ + LIMITED_API_MACROS,
20
38
  extra_compile_args=["-std=c99", "-UNDEBUG"],
39
+ py_limited_api=bool(LIMITED_API),
21
40
  )
22
41
  ]
23
42
 
@@ -39,6 +58,7 @@ setup(
39
58
  package_data={"*": ["py.typed", "*.pyi"]},
40
59
  package_dir={"": "src"},
41
60
  zip_safe=False,
61
+ options=LIMITED_API_OPTIONS,
42
62
  ext_modules=cythonize(EXTENSIONS, language_level=3, annotate=False, compiler_directives={"embedsignature": True}),
43
63
  entry_points={
44
64
  "console_scripts": [