janitor-rs 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.
@@ -0,0 +1,187 @@
1
+ # This file is autogenerated by maturin v1.9.6
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: release
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+ inputs:
18
+ version_name:
19
+ description: "One of major, minor, or patch"
20
+ required: true
21
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ linux:
27
+ runs-on: ${{ matrix.platform.runner }}
28
+ strategy:
29
+ matrix:
30
+ platform:
31
+ - runner: ubuntu-22.04
32
+ target: x86_64
33
+ - runner: ubuntu-22.04
34
+ target: x86
35
+ - runner: ubuntu-22.04
36
+ target: aarch64
37
+ - runner: ubuntu-22.04
38
+ target: armv7
39
+ - runner: ubuntu-22.04
40
+ target: s390x
41
+ - runner: ubuntu-22.04
42
+ target: ppc64le
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - uses: actions/setup-python@v5
46
+ with:
47
+ python-version: 3.x
48
+ - name: Build wheels
49
+ uses: PyO3/maturin-action@v1
50
+ with:
51
+ target: ${{ matrix.platform.target }}
52
+ args: --release --out dist --find-interpreter
53
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
54
+ manylinux: auto
55
+ - name: Upload wheels
56
+ uses: actions/upload-artifact@v4
57
+ with:
58
+ name: wheels-linux-${{ matrix.platform.target }}
59
+ path: dist
60
+
61
+ musllinux:
62
+ runs-on: ${{ matrix.platform.runner }}
63
+ strategy:
64
+ matrix:
65
+ platform:
66
+ - runner: ubuntu-22.04
67
+ target: x86_64
68
+ - runner: ubuntu-22.04
69
+ target: x86
70
+ - runner: ubuntu-22.04
71
+ target: aarch64
72
+ - runner: ubuntu-22.04
73
+ target: armv7
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - uses: actions/setup-python@v5
77
+ with:
78
+ python-version: 3.x
79
+ - name: Build wheels
80
+ uses: PyO3/maturin-action@v1
81
+ with:
82
+ target: ${{ matrix.platform.target }}
83
+ args: --release --out dist --find-interpreter
84
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
85
+ manylinux: musllinux_1_2
86
+ - name: Upload wheels
87
+ uses: actions/upload-artifact@v4
88
+ with:
89
+ name: wheels-musllinux-${{ matrix.platform.target }}
90
+ path: dist
91
+
92
+ windows:
93
+ runs-on: ${{ matrix.platform.runner }}
94
+ strategy:
95
+ matrix:
96
+ platform:
97
+ - runner: windows-latest
98
+ target: x64
99
+ - runner: windows-latest
100
+ target: x86
101
+ steps:
102
+ - uses: actions/checkout@v4
103
+ - uses: actions/setup-python@v5
104
+ with:
105
+ python-version: 3.x
106
+ architecture: ${{ matrix.platform.target }}
107
+ - name: Build wheels
108
+ uses: PyO3/maturin-action@v1
109
+ with:
110
+ target: ${{ matrix.platform.target }}
111
+ args: --release --out dist --find-interpreter
112
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
113
+ - name: Upload wheels
114
+ uses: actions/upload-artifact@v4
115
+ with:
116
+ name: wheels-windows-${{ matrix.platform.target }}
117
+ path: dist
118
+
119
+ macos:
120
+ runs-on: ${{ matrix.platform.runner }}
121
+ strategy:
122
+ matrix:
123
+ platform:
124
+ - runner: macos-13
125
+ target: x86_64
126
+ - runner: macos-14
127
+ target: aarch64
128
+ steps:
129
+ - uses: actions/checkout@v4
130
+ - uses: actions/setup-python@v5
131
+ with:
132
+ python-version: 3.x
133
+ - name: Build wheels
134
+ uses: PyO3/maturin-action@v1
135
+ with:
136
+ target: ${{ matrix.platform.target }}
137
+ args: --release --out dist --find-interpreter
138
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
139
+ - name: Upload wheels
140
+ uses: actions/upload-artifact@v4
141
+ with:
142
+ name: wheels-macos-${{ matrix.platform.target }}
143
+ path: dist
144
+
145
+ sdist:
146
+ runs-on: ubuntu-latest
147
+ steps:
148
+ - uses: actions/checkout@v4
149
+ - name: Build sdist
150
+ uses: PyO3/maturin-action@v1
151
+ with:
152
+ command: sdist
153
+ args: --out dist
154
+ - name: Upload sdist
155
+ uses: actions/upload-artifact@v4
156
+ with:
157
+ name: wheels-sdist
158
+ path: dist
159
+
160
+ release:
161
+ name: Release
162
+ runs-on: ubuntu-latest
163
+ environment: release
164
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
165
+ needs: [linux, musllinux, windows, macos, sdist]
166
+ permissions:
167
+ # Use to sign the release artifacts
168
+ id-token: write
169
+ # Used to upload release artifacts
170
+ contents: write
171
+ # Used to generate artifact attestation
172
+ attestations: write
173
+ steps:
174
+ - uses: actions/download-artifact@v4
175
+ - name: Generate artifact attestation
176
+ uses: actions/attest-build-provenance@v2
177
+ with:
178
+ subject-path: 'wheels-*/*'
179
+ - name: Publish to PyPI
180
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
181
+ uses: PyO3/maturin-action@v1
182
+ with:
183
+ command: upload
184
+ args: --non-interactive --skip-existing wheels-*/*
185
+
186
+
187
+
@@ -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,173 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "heck"
13
+ version = "0.5.0"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
16
+
17
+ [[package]]
18
+ name = "indoc"
19
+ version = "2.0.7"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
22
+ dependencies = [
23
+ "rustversion",
24
+ ]
25
+
26
+ [[package]]
27
+ name = "janitor-rs"
28
+ version = "0.1.0"
29
+ dependencies = [
30
+ "pyo3",
31
+ ]
32
+
33
+ [[package]]
34
+ name = "libc"
35
+ version = "0.2.177"
36
+ source = "registry+https://github.com/rust-lang/crates.io-index"
37
+ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
38
+
39
+ [[package]]
40
+ name = "memoffset"
41
+ version = "0.9.1"
42
+ source = "registry+https://github.com/rust-lang/crates.io-index"
43
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
44
+ dependencies = [
45
+ "autocfg",
46
+ ]
47
+
48
+ [[package]]
49
+ name = "once_cell"
50
+ version = "1.21.3"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
53
+
54
+ [[package]]
55
+ name = "portable-atomic"
56
+ version = "1.11.1"
57
+ source = "registry+https://github.com/rust-lang/crates.io-index"
58
+ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
59
+
60
+ [[package]]
61
+ name = "proc-macro2"
62
+ version = "1.0.103"
63
+ source = "registry+https://github.com/rust-lang/crates.io-index"
64
+ checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
65
+ dependencies = [
66
+ "unicode-ident",
67
+ ]
68
+
69
+ [[package]]
70
+ name = "pyo3"
71
+ version = "0.25.1"
72
+ source = "registry+https://github.com/rust-lang/crates.io-index"
73
+ checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
74
+ dependencies = [
75
+ "indoc",
76
+ "libc",
77
+ "memoffset",
78
+ "once_cell",
79
+ "portable-atomic",
80
+ "pyo3-build-config",
81
+ "pyo3-ffi",
82
+ "pyo3-macros",
83
+ "unindent",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "pyo3-build-config"
88
+ version = "0.25.1"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
91
+ dependencies = [
92
+ "once_cell",
93
+ "target-lexicon",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "pyo3-ffi"
98
+ version = "0.25.1"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
101
+ dependencies = [
102
+ "libc",
103
+ "pyo3-build-config",
104
+ ]
105
+
106
+ [[package]]
107
+ name = "pyo3-macros"
108
+ version = "0.25.1"
109
+ source = "registry+https://github.com/rust-lang/crates.io-index"
110
+ checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
111
+ dependencies = [
112
+ "proc-macro2",
113
+ "pyo3-macros-backend",
114
+ "quote",
115
+ "syn",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "pyo3-macros-backend"
120
+ version = "0.25.1"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
123
+ dependencies = [
124
+ "heck",
125
+ "proc-macro2",
126
+ "pyo3-build-config",
127
+ "quote",
128
+ "syn",
129
+ ]
130
+
131
+ [[package]]
132
+ name = "quote"
133
+ version = "1.0.42"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
136
+ dependencies = [
137
+ "proc-macro2",
138
+ ]
139
+
140
+ [[package]]
141
+ name = "rustversion"
142
+ version = "1.0.22"
143
+ source = "registry+https://github.com/rust-lang/crates.io-index"
144
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
145
+
146
+ [[package]]
147
+ name = "syn"
148
+ version = "2.0.109"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f"
151
+ dependencies = [
152
+ "proc-macro2",
153
+ "quote",
154
+ "unicode-ident",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "target-lexicon"
159
+ version = "0.13.3"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
162
+
163
+ [[package]]
164
+ name = "unicode-ident"
165
+ version = "1.0.22"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
168
+
169
+ [[package]]
170
+ name = "unindent"
171
+ version = "0.2.4"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "janitor-rs"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+
6
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
+ [lib]
8
+ name = "janitor_rs"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = "0.25.0"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 pyjanitor-devs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: janitor-rs
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.8
@@ -0,0 +1,15 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.9,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "janitor-rs"
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"]
14
+ [tool.maturin]
15
+ features = ["pyo3/extension-module"]
@@ -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 janitor_rs(m: &Bound<'_, PyModule>) -> PyResult<()> {
12
+ m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
13
+ Ok(())
14
+ }