Skip to content

Commit c48fbe1

Browse files
Try zensicial (#3)
* Try * hmm * add * add * add * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml * Update python_bindings.yml
1 parent 1b41aae commit c48fbe1

File tree

16 files changed

+801
-188
lines changed

16 files changed

+801
-188
lines changed

.github/workflows/docs.yml.bak

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
jobs:
12+
deploy:
13+
environment:
14+
name: github-pages
15+
url: ${{ steps.deployment.outputs.page_url }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/configure-pages@v5
19+
- uses: actions/checkout@v5
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.x
23+
- run: pip install zensical
24+
- run: zensical build --clean
25+
- uses: actions/upload-pages-artifact@v4
26+
with:
27+
path: site
28+
- uses: actions/deploy-pages@v4

.github/workflows/python_bindings.yml

Lines changed: 21 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424
strategy:
2525
matrix:
2626
platform:
27-
- runner: ubuntu-latest
27+
- runner: ubuntu-22.04
2828
target: x86_64
29-
- runner: ubuntu-latest
29+
- runner: ubuntu-22.04
3030
target: x86
31-
- runner: ubuntu-latest
31+
- runner: ubuntu-22.04
3232
target: aarch64
33-
- runner: ubuntu-latest
33+
- runner: ubuntu-22.04
3434
target: armv7
35-
- runner: ubuntu-latest
35+
- runner: ubuntu-22.04
3636
target: s390x
37-
- runner: ubuntu-latest
37+
- runner: ubuntu-22.04
3838
target: ppc64le
3939
steps:
4040
- uses: actions/checkout@v4
@@ -45,39 +45,30 @@ jobs:
4545
- name: Build wheels
4646
uses: PyO3/maturin-action@v1
4747
with:
48+
path: crates/python_binding
4849
target: ${{ matrix.platform.target }}
4950
args: --release --out dist --find-interpreter
5051
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
5152
manylinux: auto
52-
working-directory: crates/python_bindings
53-
54-
- name: Setup uv
55-
uses: astral-sh/uv@v6
56-
57-
- name: Install test dependencies
58-
run: uv install pytest
59-
60-
- name: Run pytest
61-
run: pytest -q
6253

6354
- name: Upload wheels
6455
uses: actions/upload-artifact@v4
6556
with:
6657
name: wheels-linux-${{ matrix.platform.target }}
67-
path: dist
58+
path: crates/python_binding/dist
6859

6960
musllinux:
7061
runs-on: ${{ matrix.platform.runner }}
7162
strategy:
7263
matrix:
7364
platform:
74-
- runner: ubuntu-latest
65+
- runner: ubuntu-22.04
7566
target: x86_64
76-
- runner: ubuntu-latest
67+
- runner: ubuntu-22.04
7768
target: x86
78-
- runner: ubuntu-latest
69+
- runner: ubuntu-22.04
7970
target: aarch64
80-
- runner: ubuntu-latest
71+
- runner: ubuntu-22.04
8172
target: armv7
8273
steps:
8374
- uses: actions/checkout@v4
@@ -88,26 +79,17 @@ jobs:
8879
- name: Build wheels
8980
uses: PyO3/maturin-action@v1
9081
with:
82+
path: crates/python_binding
9183
target: ${{ matrix.platform.target }}
9284
args: --release --out dist --find-interpreter
9385
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
9486
manylinux: musllinux_1_2
95-
working-directory: crates/python_bindings
96-
97-
- name: Setup uv
98-
uses: astral-sh/uv@v6
99-
100-
- name: Install test dependencies
101-
run: uv install pytest
102-
103-
- name: Run pytest
104-
run: pytest -q
10587

10688
- name: Upload wheels
10789
uses: actions/upload-artifact@v4
10890
with:
10991
name: wheels-musllinux-${{ matrix.platform.target }}
110-
path: dist
92+
path: crates/python_binding/dist
11193

11294
windows:
11395
runs-on: ${{ matrix.platform.runner }}
@@ -128,25 +110,16 @@ jobs:
128110
- name: Build wheels
129111
uses: PyO3/maturin-action@v1
130112
with:
113+
path: crates/python_binding
131114
target: ${{ matrix.platform.target }}
132115
args: --release --out dist --find-interpreter
133116
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
134-
working-directory: crates/python_bindings
135-
136-
- name: Setup uv
137-
uses: astral-sh/uv@v6
138-
139-
- name: Install test dependencies
140-
run: uv install pytest
141-
142-
- name: Run pytest
143-
run: pytest -q
144117

145118
- name: Upload wheels
146119
uses: actions/upload-artifact@v4
147120
with:
148121
name: wheels-windows-${{ matrix.platform.target }}
149-
path: dist
122+
path: crates/python_binding/dist
150123

151124
macos:
152125
runs-on: ${{ matrix.platform.runner }}
@@ -166,25 +139,16 @@ jobs:
166139
- name: Build wheels
167140
uses: PyO3/maturin-action@v1
168141
with:
142+
path: crates/python_binding
169143
target: ${{ matrix.platform.target }}
170144
args: --release --out dist --find-interpreter
171145
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
172-
working-directory: crates/python_bindings
173-
174-
- name: Setup uv
175-
uses: astral-sh/uv@v6
176-
177-
- name: Install test dependencies
178-
run: uv install pytest
179-
180-
- name: Run pytest
181-
run: pytest -q
182146

183147
- name: Upload wheels
184148
uses: actions/upload-artifact@v4
185149
with:
186150
name: wheels-macos-${{ matrix.platform.target }}
187-
path: dist
151+
path: crates/python_binding/dist
188152

189153
sdist:
190154
runs-on: ubuntu-latest
@@ -194,15 +158,15 @@ jobs:
194158
- name: Build sdist
195159
uses: PyO3/maturin-action@v1
196160
with:
161+
path: crates/python_binding
197162
command: sdist
198163
args: --out dist
199-
working-directory: crates/python_bindings
200164

201165
- name: Upload sdist
202166
uses: actions/upload-artifact@v4
203167
with:
204168
name: wheels-sdist
205-
path: dist
169+
path: crates/python_binding/dist
206170

207171
release:
208172
name: Release
@@ -213,21 +177,8 @@ jobs:
213177
id-token: write
214178
contents: write
215179
attestations: write
216-
217180
steps:
218181
- uses: actions/download-artifact@v4
219182

220183
- name: Generate artifact attestation
221-
uses: actions/attest-build-provenance@v2
222-
with:
223-
subject-path: 'wheels-*/*'
224-
225-
- name: Publish to PyPI
226-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
227-
uses: PyO3/maturin-action@v1
228-
env:
229-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
230-
with:
231-
command: upload
232-
args: --non-interactive --skip-existing wheels-*/*
233-
working-directory: crates/python_bindings
184+
uses: actions/a

.readthedocs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-lts-latest
5+
tools:
6+
python: 'latest'
7+
rust: 'latest'
8+
# You can also specify other tool versions:
9+
jobs:
10+
post_install:
11+
# Install with docs extras
12+
- python -m pip install uv
13+
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync
14+
15+
build:
16+
html:
17+
- zensical build
18+
19+
post_build:
20+
- mkdir -p $READTHEDOCS_OUTPUT/html/
21+
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/
22+
23+
python:
24+
install:
25+
- method: pip
26+
path: .

README.md

Whitespace-only changes.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[project]
2-
name = "bencode_rs"
2+
name = "bencode_rust"
33
dynamic = ["version"]
4-
description = "Add your description here"
4+
description = "A modern bencode parser written from scratch for the next generation of torrent streaming"
55
readme = "README.md"
6-
requires-python = ">=3.8"
6+
requires-python = ">=3.10"
77
dependencies = []
88
classifiers = [
99
"Programming Language :: Rust",
@@ -18,7 +18,4 @@ build-backend = "maturin"
1818

1919
[dependency-groups]
2020
dev = ["maturin>=1.10.2"]
21-
test = [
22-
"bencode-py>=4.0.0",
23-
"pytest>=8.3.5",
24-
]
21+
test = ["bencode-py>=4.0.0", "pytest>=8.3.5"]

0 commit comments

Comments
 (0)