pygrpc-native 0.1.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.
- pygrpc_native-0.1.0/.github/workflows/ci.yml +41 -0
- pygrpc_native-0.1.0/.github/workflows/release.yml +81 -0
- pygrpc_native-0.1.0/.gitignore +5 -0
- pygrpc_native-0.1.0/Cargo.lock +693 -0
- pygrpc_native-0.1.0/Cargo.toml +41 -0
- pygrpc_native-0.1.0/LICENSE +201 -0
- pygrpc_native-0.1.0/PKG-INFO +141 -0
- pygrpc_native-0.1.0/README.md +126 -0
- pygrpc_native-0.1.0/pygrpc_native.pyi +31 -0
- pygrpc_native-0.1.0/pyproject.toml +25 -0
- pygrpc_native-0.1.0/src/lib.rs +432 -0
- pygrpc_native-0.1.0/src/server.rs +918 -0
- pygrpc_native-0.1.0/tests/test_calls.py +203 -0
- pygrpc_native-0.1.0/tests/test_front.py +101 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
rust:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
16
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
17
|
+
with:
|
|
18
|
+
components: rustfmt, clippy
|
|
19
|
+
- run: cargo fmt --check
|
|
20
|
+
- run: cargo clippy --locked --all-targets --no-default-features -- -D warnings
|
|
21
|
+
- run: cargo test --locked --no-default-features
|
|
22
|
+
|
|
23
|
+
python:
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
os: [ubuntu-latest, macos-latest]
|
|
28
|
+
python: ["3.10", "3.13"]
|
|
29
|
+
runs-on: ${{ matrix.os }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
32
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python }}
|
|
35
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
36
|
+
- name: Build and install
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install maturin pytest grpcio
|
|
39
|
+
maturin build --release --locked --out dist
|
|
40
|
+
python -m pip install dist/*.whl
|
|
41
|
+
- run: pytest -q tests
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Push a tag vX.Y.Z matching the version in Cargo.toml to publish to PyPI.
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
wheels:
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
include:
|
|
19
|
+
- runner: ubuntu-latest
|
|
20
|
+
target: x86_64
|
|
21
|
+
- runner: ubuntu-24.04-arm
|
|
22
|
+
target: aarch64
|
|
23
|
+
- runner: macos-latest
|
|
24
|
+
target: aarch64-apple-darwin
|
|
25
|
+
- runner: macos-latest
|
|
26
|
+
target: x86_64-apple-darwin
|
|
27
|
+
runs-on: ${{ matrix.runner }}
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
30
|
+
- name: Check the tag matches Cargo.toml
|
|
31
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
32
|
+
run: |
|
|
33
|
+
version=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)
|
|
34
|
+
test "v$version" = "$GITHUB_REF_NAME"
|
|
35
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
36
|
+
with:
|
|
37
|
+
target: ${{ matrix.target }}
|
|
38
|
+
manylinux: "2_28"
|
|
39
|
+
args: --release --locked --out dist
|
|
40
|
+
# The oldest Python the abi3 wheel claims; the x86_64 macOS wheel can't
|
|
41
|
+
# run on the arm64 runner, so it is only built.
|
|
42
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
43
|
+
if: matrix.target != 'x86_64-apple-darwin'
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.10"
|
|
46
|
+
- name: Test the wheel
|
|
47
|
+
if: matrix.target != 'x86_64-apple-darwin'
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install pytest grpcio dist/*.whl
|
|
50
|
+
pytest -q tests
|
|
51
|
+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
52
|
+
with:
|
|
53
|
+
name: wheels-${{ matrix.target }}
|
|
54
|
+
path: dist/*.whl
|
|
55
|
+
|
|
56
|
+
sdist:
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
60
|
+
- uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
61
|
+
with:
|
|
62
|
+
command: sdist
|
|
63
|
+
args: --out dist
|
|
64
|
+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
65
|
+
with:
|
|
66
|
+
name: sdist
|
|
67
|
+
path: dist/*.tar.gz
|
|
68
|
+
|
|
69
|
+
publish:
|
|
70
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
71
|
+
needs: [wheels, sdist]
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment: pypi
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
78
|
+
with:
|
|
79
|
+
merge-multiple: true
|
|
80
|
+
path: dist
|
|
81
|
+
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|