rxgraph 0.0.3__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,183 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ tags:
9
+ - '*'
10
+ pull_request:
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ # TODO: Reintroduce Windows and Linux (linux, musllinux, windows)
18
+ # linux:
19
+ # runs-on: ${{ matrix.platform.runner }}
20
+ # strategy:
21
+ # matrix:
22
+ # platform:
23
+ # - runner: ubuntu-22.04
24
+ # target: x86_64
25
+ # # - runner: ubuntu-22.04
26
+ # # target: x86
27
+ # - runner: ubuntu-22.04
28
+ # target: aarch64
29
+ # # - runner: ubuntu-22.04
30
+ # # target: armv7
31
+ # # - runner: ubuntu-22.04
32
+ # # target: s390x
33
+ # # - runner: ubuntu-22.04
34
+ # # target: ppc64le
35
+ # steps:
36
+ # - uses: actions/checkout@v6
37
+ # - uses: actions/setup-python@v6
38
+ # with:
39
+ # python-version: "3.x"
40
+ # - name: Build wheels
41
+ # uses: PyO3/maturin-action@v1
42
+ # with:
43
+ # target: ${{ matrix.platform.target }}
44
+ # args: --release --out dist --find-interpreter
45
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
46
+ # manylinux: auto
47
+ # - name: Upload wheels
48
+ # uses: actions/upload-artifact@v6
49
+ # with:
50
+ # name: wheels-linux-${{ matrix.platform.target }}
51
+ # path: dist
52
+
53
+ # musllinux:
54
+ # runs-on: ${{ matrix.platform.runner }}
55
+ # strategy:
56
+ # matrix:
57
+ # platform:
58
+ # - runner: ubuntu-22.04
59
+ # target: x86_64
60
+ # - runner: ubuntu-22.04
61
+ # target: x86
62
+ # - runner: ubuntu-22.04
63
+ # target: aarch64
64
+ # - runner: ubuntu-22.04
65
+ # target: armv7
66
+ # steps:
67
+ # - uses: actions/checkout@v6
68
+ # - uses: actions/setup-python@v6
69
+ # with:
70
+ # python-version: "3.x"
71
+ # - name: Build wheels
72
+ # uses: PyO3/maturin-action@v1
73
+ # with:
74
+ # target: ${{ matrix.platform.target }}
75
+ # args: --release --out dist --find-interpreter
76
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
77
+ # manylinux: musllinux_1_2
78
+ # - name: Upload wheels
79
+ # uses: actions/upload-artifact@v6
80
+ # with:
81
+ # name: wheels-musllinux-${{ matrix.platform.target }}
82
+ # path: dist
83
+
84
+ # windows:
85
+ # runs-on: ${{ matrix.platform.runner }}
86
+ # strategy:
87
+ # matrix:
88
+ # platform:
89
+ # - runner: windows-latest
90
+ # target: x64
91
+ # python_arch: x64
92
+ # - runner: windows-latest
93
+ # target: x86
94
+ # python_arch: x86
95
+ # - runner: windows-11-arm
96
+ # target: aarch64
97
+ # python_arch: arm64
98
+ # steps:
99
+ # - uses: actions/checkout@v6
100
+ # - uses: actions/setup-python@v6
101
+ # with:
102
+ # python-version: "3.13"
103
+ # architecture: ${{ matrix.platform.python_arch }}
104
+ # - name: Build wheels
105
+ # uses: PyO3/maturin-action@v1
106
+ # with:
107
+ # target: ${{ matrix.platform.target }}
108
+ # args: --release --out dist --find-interpreter
109
+ # sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
110
+ # - name: Upload wheels
111
+ # uses: actions/upload-artifact@v6
112
+ # with:
113
+ # name: wheels-windows-${{ matrix.platform.target }}
114
+ # path: dist
115
+
116
+ macos:
117
+ runs-on: ${{ matrix.platform.runner }}
118
+ strategy:
119
+ matrix:
120
+ platform:
121
+ - runner: macos-15-intel
122
+ target: x86_64
123
+ - runner: macos-latest
124
+ target: aarch64
125
+ steps:
126
+ - uses: actions/checkout@v6
127
+ - uses: actions/setup-python@v6
128
+ with:
129
+ python-version: "3.x"
130
+ - name: Build wheels
131
+ uses: PyO3/maturin-action@v1
132
+ with:
133
+ target: ${{ matrix.platform.target }}
134
+ args: --release --out dist --find-interpreter
135
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
136
+ - name: Upload wheels
137
+ uses: actions/upload-artifact@v6
138
+ with:
139
+ name: wheels-macos-${{ matrix.platform.target }}
140
+ path: dist
141
+
142
+ sdist:
143
+ runs-on: ubuntu-latest
144
+ steps:
145
+ - uses: actions/checkout@v6
146
+ - name: Build sdist
147
+ uses: PyO3/maturin-action@v1
148
+ with:
149
+ command: sdist
150
+ args: --out dist
151
+ - name: Upload sdist
152
+ uses: actions/upload-artifact@v6
153
+ with:
154
+ name: wheels-sdist
155
+ path: dist
156
+
157
+ release:
158
+ name: Release
159
+ runs-on: ubuntu-latest
160
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
161
+ # TODO: Reintroduce Windows and Linux (linux, musllinux, windows)
162
+ needs: [macos, sdist]
163
+ permissions:
164
+ # Use to sign the release artifacts
165
+ id-token: write
166
+ # Used to upload release artifacts
167
+ contents: write
168
+ # Used to generate artifact attestation
169
+ attestations: write
170
+ steps:
171
+ - uses: actions/download-artifact@v7
172
+ - name: Generate artifact attestation
173
+ uses: actions/attest@v4
174
+ with:
175
+ subject-path: 'wheels-*/*'
176
+ - name: Install uv
177
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
178
+ uses: astral-sh/setup-uv@v7
179
+ - name: Publish to PyPI
180
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
181
+ run: uv publish 'wheels-*/*'
182
+ env:
183
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,72 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
@@ -0,0 +1,133 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "heck"
7
+ version = "0.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
10
+
11
+ [[package]]
12
+ name = "libc"
13
+ version = "0.2.186"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
16
+
17
+ [[package]]
18
+ name = "once_cell"
19
+ version = "1.21.4"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
22
+
23
+ [[package]]
24
+ name = "portable-atomic"
25
+ version = "1.13.1"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
28
+
29
+ [[package]]
30
+ name = "proc-macro2"
31
+ version = "1.0.106"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
34
+ dependencies = [
35
+ "unicode-ident",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "pyo3"
40
+ version = "0.28.3"
41
+ source = "registry+https://github.com/rust-lang/crates.io-index"
42
+ checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
43
+ dependencies = [
44
+ "libc",
45
+ "once_cell",
46
+ "portable-atomic",
47
+ "pyo3-build-config",
48
+ "pyo3-ffi",
49
+ "pyo3-macros",
50
+ ]
51
+
52
+ [[package]]
53
+ name = "pyo3-build-config"
54
+ version = "0.28.3"
55
+ source = "registry+https://github.com/rust-lang/crates.io-index"
56
+ checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
57
+ dependencies = [
58
+ "target-lexicon",
59
+ ]
60
+
61
+ [[package]]
62
+ name = "pyo3-ffi"
63
+ version = "0.28.3"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
66
+ dependencies = [
67
+ "libc",
68
+ "pyo3-build-config",
69
+ ]
70
+
71
+ [[package]]
72
+ name = "pyo3-macros"
73
+ version = "0.28.3"
74
+ source = "registry+https://github.com/rust-lang/crates.io-index"
75
+ checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
76
+ dependencies = [
77
+ "proc-macro2",
78
+ "pyo3-macros-backend",
79
+ "quote",
80
+ "syn",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "pyo3-macros-backend"
85
+ version = "0.28.3"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
88
+ dependencies = [
89
+ "heck",
90
+ "proc-macro2",
91
+ "pyo3-build-config",
92
+ "quote",
93
+ "syn",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "quote"
98
+ version = "1.0.45"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
101
+ dependencies = [
102
+ "proc-macro2",
103
+ ]
104
+
105
+ [[package]]
106
+ name = "rxgraph"
107
+ version = "0.0.3"
108
+ dependencies = [
109
+ "pyo3",
110
+ ]
111
+
112
+ [[package]]
113
+ name = "syn"
114
+ version = "2.0.117"
115
+ source = "registry+https://github.com/rust-lang/crates.io-index"
116
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
117
+ dependencies = [
118
+ "proc-macro2",
119
+ "quote",
120
+ "unicode-ident",
121
+ ]
122
+
123
+ [[package]]
124
+ name = "target-lexicon"
125
+ version = "0.13.5"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
128
+
129
+ [[package]]
130
+ name = "unicode-ident"
131
+ version = "1.0.24"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "rxgraph"
3
+ version = "0.0.3"
4
+ edition = "2024"
5
+ readme = "README.md"
6
+
7
+ [lib]
8
+ name = "rxgraph"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = "0.28.3"
rxgraph-0.0.3/PKG-INFO ADDED
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: rxgraph
3
+ Version: 0.0.3
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Python: >=3.8
@@ -0,0 +1 @@
1
+ # rxgraph
@@ -0,0 +1,13 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.13,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "rxgraph"
7
+ requires-python = ">=3.8"
8
+ classifiers = [
9
+ "Programming Language :: Rust",
10
+ "Programming Language :: Python :: Implementation :: CPython",
11
+ "Programming Language :: Python :: Implementation :: PyPy",
12
+ ]
13
+ dynamic = ["version"]
@@ -0,0 +1,14 @@
1
+ use pyo3::prelude::*;
2
+
3
+ /// Formats the sum of two numbers as string.
4
+ #[pyfunction]
5
+ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
6
+ Ok((a + b).to_string())
7
+ }
8
+
9
+ /// A Python module implemented in Rust.
10
+ #[pymodule]
11
+ fn rxgraph(m: &Bound<'_, PyModule>) -> PyResult<()> {
12
+ m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
13
+ Ok(())
14
+ }