bencode-rs 0.0.2a1__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.
@@ -0,0 +1,11 @@
1
+ [paths]
2
+ source =
3
+ bencode2
4
+
5
+ [run]
6
+ branch = true
7
+ plugins = Cython.Coverage
8
+
9
+ [report]
10
+ show_missing = true
11
+ precision = 2
@@ -0,0 +1 @@
1
+ *.bin binary
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "local>trim21/renovate-config"
5
+ ]
6
+ }
@@ -0,0 +1,130 @@
1
+ name: Reusable workflow example
2
+
3
+ on:
4
+ workflow_call:
5
+
6
+ jobs:
7
+ sdist:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - name: Build sdist
12
+ uses: PyO3/maturin-action@v1
13
+ with:
14
+ command: sdist
15
+ args: --out dist
16
+ - name: Upload sdist
17
+ uses: actions/upload-artifact@v4
18
+ with:
19
+ name: wheels-sdist
20
+ path: dist
21
+
22
+ macos:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ strategy:
25
+ matrix:
26
+ platform:
27
+ - runner: macos-latest
28
+ target: x86_64
29
+ - runner: macos-14
30
+ target: aarch64
31
+ steps:
32
+ - uses: actions/checkout@v4
33
+ - uses: actions/setup-python@v5
34
+ with:
35
+ python-version: '3.10'
36
+ - name: Build wheels
37
+ uses: PyO3/maturin-action@v1
38
+ with:
39
+ target: ${{ matrix.platform.target }}
40
+ args: --release --out dist
41
+ sccache: 'true'
42
+ - name: Upload wheels
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: wheels-macos-${{ matrix.platform.target }}
46
+ path: dist
47
+
48
+ windows:
49
+ runs-on: ${{ matrix.platform.runner }}
50
+ strategy:
51
+ matrix:
52
+ platform:
53
+ - runner: windows-latest
54
+ target: x64
55
+ - runner: windows-latest
56
+ target: x86
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - uses: actions/setup-python@v5
60
+ with:
61
+ python-version: '3.10'
62
+ architecture: ${{ matrix.platform.target }}
63
+ - name: Build wheels
64
+ uses: PyO3/maturin-action@v1
65
+ with:
66
+ target: ${{ matrix.platform.target }}
67
+ args: --release --out dist
68
+ sccache: 'true'
69
+ - name: Upload wheels
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: wheels-windows-${{ matrix.platform.target }}
73
+ path: dist
74
+
75
+ linux:
76
+ runs-on: ${{ matrix.platform.runner }}
77
+ strategy:
78
+ matrix:
79
+ platform:
80
+ - runner: ubuntu-latest
81
+ target: x86_64
82
+ - runner: ubuntu-latest
83
+ target: x86
84
+ - runner: ubuntu-latest
85
+ target: aarch64
86
+ - runner: ubuntu-latest
87
+ target: armv7
88
+ - runner: ubuntu-latest
89
+ target: s390x
90
+ - runner: ubuntu-latest
91
+ target: ppc64le
92
+ steps:
93
+ - uses: actions/checkout@v4
94
+ - uses: actions/setup-python@v5
95
+ with:
96
+ python-version: '3.10'
97
+ - name: Build wheels
98
+ uses: PyO3/maturin-action@v1
99
+ with:
100
+ target: ${{ matrix.platform.target }}
101
+ args: --release --out dist
102
+ sccache: 'true'
103
+ manylinux: auto
104
+ - name: Upload wheels
105
+ uses: actions/upload-artifact@v4
106
+ with:
107
+ name: wheels-linux-${{ matrix.platform.target }}
108
+ path: dist
109
+
110
+ merge-wheel-artifact:
111
+ runs-on: ubuntu-latest
112
+ needs: [ "linux", "windows", "macos", "sdist" ]
113
+ steps:
114
+ - name: Merge Artifacts
115
+ uses: actions/upload-artifact/merge@v4
116
+ with:
117
+ name: wheel
118
+ pattern: wheels-*
119
+
120
+ check-dist:
121
+ name: Check dist
122
+ needs: [ merge-wheel-artifact ]
123
+ runs-on: ubuntu-latest
124
+ steps:
125
+ - uses: actions/download-artifact@v4
126
+ with:
127
+ name: wheel
128
+ path: dist
129
+
130
+ - run: pipx run twine check --strict dist/*
@@ -0,0 +1,35 @@
1
+ name: Build Wheels
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ tags-ignore:
8
+ - "*"
9
+
10
+ jobs:
11
+ build:
12
+ concurrency:
13
+ group: "${{ github.workflow }}-${{ github.ref }}"
14
+ cancel-in-progress: true
15
+ uses: ./.github/workflows/_build_wheels.yaml
16
+
17
+ audit:
18
+ name: Audit
19
+ needs: [build]
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.x"
27
+
28
+ - run: pip install abi3audit
29
+
30
+ - uses: actions/download-artifact@v4
31
+ with:
32
+ name: wheel
33
+ path: dist
34
+
35
+ - run: abi3audit --verbose dist/*.whl
@@ -0,0 +1,26 @@
1
+ name: Build Wheels for PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ build:
10
+ uses: ./.github/workflows/_build_wheels.yaml
11
+
12
+ upload_all:
13
+ name: Upload wheels to PyPI
14
+ needs: [build]
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/download-artifact@v4.1.7
18
+ with:
19
+ name: wheel
20
+ path: dist
21
+
22
+ - uses: pypa/gh-action-pypi-publish@v1.8.14
23
+ with:
24
+ #! Update with your project's PyPI API Token Name!
25
+ user: __token__
26
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,44 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ workflow_dispatch:
8
+ push:
9
+ branches:
10
+ - master
11
+ tags-ignore:
12
+ - "*"
13
+
14
+ jobs:
15
+ test:
16
+ strategy:
17
+ max-parallel: 5
18
+ matrix:
19
+ os: ["ubuntu-latest", "macos-latest", "windows-latest"]
20
+ python-version:
21
+ - "3.8"
22
+ - "3.9"
23
+ - "3.10"
24
+ - "3.11"
25
+ - "3.12"
26
+
27
+ runs-on: "${{ matrix.os }}"
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions-rust-lang/setup-rust-toolchain@v1
32
+
33
+ - name: Set up Python ${{ matrix.python-version }}
34
+ uses: actions/setup-python@v5
35
+ with:
36
+ python-version: ${{ matrix.python-version }}
37
+ cache: "pip" # caching pip dependencies
38
+
39
+ - run: pip install -e '.[dev]'
40
+
41
+ - name: Run pytest
42
+ run: python -m pytest -sv
43
+ env:
44
+ RUST_BACKTRACE: 'full'
@@ -0,0 +1,282 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/c++,python,c,visualstudiocode
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=c++,python,c,visualstudiocode
3
+
4
+ ### Cython ###
5
+ # Cython recompiles C/C++ files so no need to keep these.
6
+ #! Update: _unless_! you are writing custom C/CPP files in which case you will want to add those manually or remove the below.
7
+ *.c
8
+ *.cpp
9
+
10
+ ### C ###
11
+ # Prerequisites
12
+ *.d
13
+
14
+ # Object files
15
+ *.o
16
+ *.ko
17
+ *.obj
18
+ *.elf
19
+
20
+ # Linker output
21
+ *.ilk
22
+ *.map
23
+ *.exp
24
+
25
+ # Precompiled Headers
26
+ *.gch
27
+ *.pch
28
+
29
+ # Libraries
30
+ *.lib
31
+ *.a
32
+ *.la
33
+ *.lo
34
+
35
+ # Shared objects (inc. Windows DLLs)
36
+ *.dll
37
+ *.so
38
+ *.so.*
39
+ *.dylib
40
+
41
+ # Executables
42
+ *.exe
43
+ *.out
44
+ *.app
45
+ *.i*86
46
+ *.x86_64
47
+ *.hex
48
+
49
+ # Debug files
50
+ *.dSYM/
51
+ *.su
52
+ *.idb
53
+ *.pdb
54
+
55
+ # Kernel Module Compile Results
56
+ *.mod*
57
+ *.cmd
58
+ .tmp_versions/
59
+ modules.order
60
+ Module.symvers
61
+ Mkfile.old
62
+ dkms.conf
63
+
64
+ ### C++ ###
65
+ # Prerequisites
66
+
67
+ # Compiled Object files
68
+ *.slo
69
+
70
+ # Precompiled Headers
71
+
72
+ # Compiled Dynamic libraries
73
+
74
+ # Fortran module files
75
+ *.mod
76
+ *.smod
77
+
78
+ # Compiled Static libraries
79
+ *.lai
80
+
81
+ # Executables
82
+
83
+ ### Python ###
84
+ # Byte-compiled / optimized / DLL files
85
+ __pycache__/
86
+ *.py[cod]
87
+ *$py.class
88
+
89
+ # C extensions
90
+
91
+ # Distribution / packaging
92
+ .Python
93
+ build/
94
+ develop-eggs/
95
+ dist/
96
+ downloads/
97
+ eggs/
98
+ .eggs/
99
+ lib/
100
+ lib64/
101
+ parts/
102
+ sdist/
103
+ var/
104
+ wheels/
105
+ share/python-wheels/
106
+ *.egg-info/
107
+ .installed.cfg
108
+ *.egg
109
+ MANIFEST
110
+ target/
111
+
112
+ # PyInstaller
113
+ # Usually these files are written by a python script from a template
114
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
115
+ *.manifest
116
+ *.spec
117
+
118
+ # Installer logs
119
+ pip-log.txt
120
+ pip-delete-this-directory.txt
121
+
122
+ # Unit test / coverage reports
123
+ htmlcov/
124
+ .tox/
125
+ .nox/
126
+ .coverage
127
+ .coverage.*
128
+ .cache
129
+ nosetests.xml
130
+ coverage.xml
131
+ *.cover
132
+ *.py,cover
133
+ .hypothesis/
134
+ .pytest_cache/
135
+ cover/
136
+ .benchmarks/
137
+ bench.json
138
+
139
+ # Translations
140
+ *.mo
141
+ *.pot
142
+
143
+ # Django stuff:
144
+ *.log
145
+ local_settings.py
146
+ db.sqlite3
147
+ db.sqlite3-journal
148
+
149
+ # Flask stuff:
150
+ instance/
151
+ .webassets-cache
152
+
153
+ # Scrapy stuff:
154
+ .scrapy
155
+
156
+ # Sphinx documentation
157
+ docs/_build/
158
+
159
+ # PyBuilder
160
+ .pybuilder/
161
+ target/
162
+
163
+ # Jupyter Notebook
164
+ .ipynb_checkpoints
165
+
166
+ # IPython
167
+ profile_default/
168
+ ipython_config.py
169
+
170
+ # pyenv
171
+ # For a library or package, you might want to ignore these files since the code is
172
+ # intended to run in multiple environments; otherwise, check them in:
173
+ # .python-version
174
+
175
+ # pipenv
176
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
177
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
178
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
179
+ # install all needed dependencies.
180
+ #Pipfile.lock
181
+
182
+ # poetry
183
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
184
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
185
+ # commonly ignored for libraries.
186
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
187
+ #poetry.lock
188
+
189
+ # pdm
190
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
191
+ #pdm.lock
192
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
193
+ # in version control.
194
+ # https://pdm.fming.dev/#use-with-ide
195
+ .pdm.toml
196
+
197
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
198
+ __pypackages__/
199
+
200
+ # Celery stuff
201
+ celerybeat-schedule
202
+ celerybeat.pid
203
+
204
+ # SageMath parsed files
205
+ *.sage.py
206
+
207
+ # Environments
208
+ .env
209
+ .venv
210
+ env/
211
+ venv/
212
+ ENV/
213
+ env.bak/
214
+ venv.bak/
215
+
216
+ # Spyder project settings
217
+ .spyderproject
218
+ .spyproject
219
+
220
+ # Rope project settings
221
+ .ropeproject
222
+
223
+ # mkdocs documentation
224
+ /site
225
+
226
+ # mypy
227
+ .mypy_cache/
228
+ .dmypy.json
229
+ dmypy.json
230
+
231
+ # Pyre type checker
232
+ .pyre/
233
+
234
+ # pytype static type analyzer
235
+ .pytype/
236
+
237
+ # Cython debug symbols
238
+ cython_debug/
239
+
240
+ # PyCharm
241
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
242
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
243
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
244
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
245
+ .idea/
246
+ .vscode/
247
+
248
+ ### Python Patch ###
249
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
250
+ poetry.toml
251
+
252
+ # ruff
253
+ .ruff_cache/
254
+
255
+ # LSP config files
256
+ pyrightconfig.json
257
+
258
+ ### VisualStudioCode ###
259
+ .vscode/*
260
+ !.vscode/settings.json
261
+ !.vscode/tasks.json
262
+ !.vscode/launch.json
263
+ !.vscode/extensions.json
264
+ !.vscode/*.code-snippets
265
+
266
+ ### Jetbrains IDE
267
+ .idea/
268
+
269
+ # Local History for Visual Studio Code
270
+ .history/
271
+
272
+ # Built Visual Studio Code Extensions
273
+ *.vsix
274
+
275
+ ### VisualStudioCode Patch ###
276
+ # Ignore all local history of files
277
+ .history
278
+ .ionide
279
+
280
+ # End of https://www.toptal.com/developers/gitignore/api/c++,python,c,visualstudiocode
281
+ .task/
282
+ taskfile.yaml