oidfpolicy 0.0.1__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,180 @@
1
+ # This file is autogenerated by maturin v1.9.4
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: release
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ tags:
13
+ - '*'
14
+ pull_request:
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ linux:
22
+ runs-on: ${{ matrix.platform.runner }}
23
+ strategy:
24
+ matrix:
25
+ platform:
26
+ - runner: ubuntu-22.04
27
+ target: x86_64
28
+ - runner: ubuntu-22.04
29
+ target: x86
30
+ - runner: ubuntu-22.04
31
+ target: aarch64
32
+ - runner: ubuntu-22.04
33
+ target: armv7
34
+ - runner: ubuntu-22.04
35
+ target: s390x
36
+ - runner: ubuntu-22.04
37
+ target: ppc64le
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: actions/setup-python@v5
41
+ with:
42
+ python-version: 3.x
43
+ - name: Build wheels
44
+ uses: PyO3/maturin-action@v1
45
+ with:
46
+ target: ${{ matrix.platform.target }}
47
+ args: --release --out dist --find-interpreter
48
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
49
+ manylinux: auto
50
+ - name: Upload wheels
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: wheels-linux-${{ matrix.platform.target }}
54
+ path: dist
55
+
56
+ musllinux:
57
+ runs-on: ${{ matrix.platform.runner }}
58
+ strategy:
59
+ matrix:
60
+ platform:
61
+ - runner: ubuntu-22.04
62
+ target: x86_64
63
+ - runner: ubuntu-22.04
64
+ target: x86
65
+ - runner: ubuntu-22.04
66
+ target: aarch64
67
+ - runner: ubuntu-22.04
68
+ target: armv7
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ - uses: actions/setup-python@v5
72
+ with:
73
+ python-version: 3.x
74
+ - name: Build wheels
75
+ uses: PyO3/maturin-action@v1
76
+ with:
77
+ target: ${{ matrix.platform.target }}
78
+ args: --release --out dist --find-interpreter
79
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
80
+ manylinux: musllinux_1_2
81
+ - name: Upload wheels
82
+ uses: actions/upload-artifact@v4
83
+ with:
84
+ name: wheels-musllinux-${{ matrix.platform.target }}
85
+ path: dist
86
+
87
+ #windows:
88
+ #runs-on: ${{ matrix.platform.runner }}
89
+ #strategy:
90
+ #matrix:
91
+ #platform:
92
+ #- runner: windows-latest
93
+ #target: x64
94
+ #- runner: windows-latest
95
+ #target: x86
96
+ #steps:
97
+ #- uses: actions/checkout@v4
98
+ #- uses: actions/setup-python@v5
99
+ #with:
100
+ #python-version: 3.x
101
+ #architecture: ${{ matrix.platform.target }}
102
+ #- name: Build wheels
103
+ #uses: PyO3/maturin-action@v1
104
+ #with:
105
+ #target: ${{ matrix.platform.target }}
106
+ #args: --release --out dist --find-interpreter
107
+ #sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
108
+ #- name: Upload wheels
109
+ #uses: actions/upload-artifact@v4
110
+ #with:
111
+ #name: wheels-windows-${{ matrix.platform.target }}
112
+ #path: dist
113
+
114
+ macos:
115
+ runs-on: ${{ matrix.platform.runner }}
116
+ strategy:
117
+ matrix:
118
+ platform:
119
+ - runner: macos-13
120
+ target: x86_64
121
+ - runner: macos-14
122
+ target: aarch64
123
+ steps:
124
+ - uses: actions/checkout@v4
125
+ - uses: actions/setup-python@v5
126
+ with:
127
+ python-version: 3.x
128
+ - name: Build wheels
129
+ uses: PyO3/maturin-action@v1
130
+ with:
131
+ target: ${{ matrix.platform.target }}
132
+ args: --release --out dist --find-interpreter
133
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
134
+ - name: Upload wheels
135
+ uses: actions/upload-artifact@v4
136
+ with:
137
+ name: wheels-macos-${{ matrix.platform.target }}
138
+ path: dist
139
+
140
+ sdist:
141
+ runs-on: ubuntu-latest
142
+ steps:
143
+ - uses: actions/checkout@v4
144
+ - name: Build sdist
145
+ uses: PyO3/maturin-action@v1
146
+ with:
147
+ command: sdist
148
+ args: --out dist
149
+ - name: Upload sdist
150
+ uses: actions/upload-artifact@v4
151
+ with:
152
+ name: wheels-sdist
153
+ path: dist
154
+
155
+ release:
156
+ name: Release
157
+ runs-on: ubuntu-latest
158
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
159
+ needs: [linux, musllinux, windows, macos, sdist]
160
+ permissions:
161
+ # Use to sign the release artifacts
162
+ id-token: write
163
+ # Used to upload release artifacts
164
+ contents: write
165
+ # Used to generate artifact attestation
166
+ attestations: write
167
+ steps:
168
+ - uses: actions/download-artifact@v4
169
+ - name: Generate artifact attestation
170
+ uses: actions/attest-build-provenance@v2
171
+ with:
172
+ subject-path: 'wheels-*/*'
173
+ - name: Publish to PyPI
174
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
175
+ uses: PyO3/maturin-action@v1
176
+ env:
177
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
178
+ with:
179
+ command: upload
180
+ args: --non-interactive --skip-existing wheels-*/*
@@ -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,164 @@
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.6"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
22
+
23
+ [[package]]
24
+ name = "libc"
25
+ version = "0.2.175"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
28
+
29
+ [[package]]
30
+ name = "memoffset"
31
+ version = "0.9.1"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
34
+ dependencies = [
35
+ "autocfg",
36
+ ]
37
+
38
+ [[package]]
39
+ name = "oidfpolicy"
40
+ version = "0.0.1"
41
+ dependencies = [
42
+ "pyo3",
43
+ ]
44
+
45
+ [[package]]
46
+ name = "once_cell"
47
+ version = "1.21.3"
48
+ source = "registry+https://github.com/rust-lang/crates.io-index"
49
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
50
+
51
+ [[package]]
52
+ name = "portable-atomic"
53
+ version = "1.11.1"
54
+ source = "registry+https://github.com/rust-lang/crates.io-index"
55
+ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
56
+
57
+ [[package]]
58
+ name = "proc-macro2"
59
+ version = "1.0.101"
60
+ source = "registry+https://github.com/rust-lang/crates.io-index"
61
+ checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
62
+ dependencies = [
63
+ "unicode-ident",
64
+ ]
65
+
66
+ [[package]]
67
+ name = "pyo3"
68
+ version = "0.25.1"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a"
71
+ dependencies = [
72
+ "indoc",
73
+ "libc",
74
+ "memoffset",
75
+ "once_cell",
76
+ "portable-atomic",
77
+ "pyo3-build-config",
78
+ "pyo3-ffi",
79
+ "pyo3-macros",
80
+ "unindent",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "pyo3-build-config"
85
+ version = "0.25.1"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598"
88
+ dependencies = [
89
+ "once_cell",
90
+ "target-lexicon",
91
+ ]
92
+
93
+ [[package]]
94
+ name = "pyo3-ffi"
95
+ version = "0.25.1"
96
+ source = "registry+https://github.com/rust-lang/crates.io-index"
97
+ checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c"
98
+ dependencies = [
99
+ "libc",
100
+ "pyo3-build-config",
101
+ ]
102
+
103
+ [[package]]
104
+ name = "pyo3-macros"
105
+ version = "0.25.1"
106
+ source = "registry+https://github.com/rust-lang/crates.io-index"
107
+ checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50"
108
+ dependencies = [
109
+ "proc-macro2",
110
+ "pyo3-macros-backend",
111
+ "quote",
112
+ "syn",
113
+ ]
114
+
115
+ [[package]]
116
+ name = "pyo3-macros-backend"
117
+ version = "0.25.1"
118
+ source = "registry+https://github.com/rust-lang/crates.io-index"
119
+ checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc"
120
+ dependencies = [
121
+ "heck",
122
+ "proc-macro2",
123
+ "pyo3-build-config",
124
+ "quote",
125
+ "syn",
126
+ ]
127
+
128
+ [[package]]
129
+ name = "quote"
130
+ version = "1.0.40"
131
+ source = "registry+https://github.com/rust-lang/crates.io-index"
132
+ checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
133
+ dependencies = [
134
+ "proc-macro2",
135
+ ]
136
+
137
+ [[package]]
138
+ name = "syn"
139
+ version = "2.0.106"
140
+ source = "registry+https://github.com/rust-lang/crates.io-index"
141
+ checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
142
+ dependencies = [
143
+ "proc-macro2",
144
+ "quote",
145
+ "unicode-ident",
146
+ ]
147
+
148
+ [[package]]
149
+ name = "target-lexicon"
150
+ version = "0.13.3"
151
+ source = "registry+https://github.com/rust-lang/crates.io-index"
152
+ checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
153
+
154
+ [[package]]
155
+ name = "unicode-ident"
156
+ version = "1.0.19"
157
+ source = "registry+https://github.com/rust-lang/crates.io-index"
158
+ checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
159
+
160
+ [[package]]
161
+ name = "unindent"
162
+ version = "0.2.4"
163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
164
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
@@ -0,0 +1,20 @@
1
+ [package]
2
+ name = "oidfpolicy"
3
+ version = "0.0.1"
4
+ edition = "2021"
5
+ description = "Python module to merge OIDF policy and applying policy to metadata."
6
+ documentation = "https://github.com/SUNET/oidfpolicy"
7
+ readme = "README.md"
8
+ homepage = "https://github.com/SUNET/oidfpolicy"
9
+ repository = "https://github.com/SUNET/oidfpolicy"
10
+ license-file = "LICENSE"
11
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
12
+ [lib]
13
+ name = "oidfpolicy"
14
+ crate-type = ["cdylib"]
15
+
16
+
17
+ [dependencies.pyo3]
18
+ version = "0.25.0"
19
+ # "abi3-py38" tells pyo3 (and maturin) to build using the stable ABI with minimum Python version 3.8
20
+ features = ["abi3-py310"]
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2025, Sunet
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: oidfpolicy
3
+ Version: 0.0.1
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ License-File: LICENSE
8
+ Home-Page: https://github.com/SUNET/oidfpolicy
9
+ Requires-Python: >=3.10
@@ -0,0 +1,12 @@
1
+ # OpenID-federation policy
2
+
3
+ This is a Python module which allows merging `openid-federation` policies and
4
+ applying a given policy to some given metadata. All input and output is in
5
+ JSON.
6
+
7
+
8
+ `0.0.1` is a test release.
9
+
10
+ ## License
11
+
12
+ BSD-2-Clause
@@ -0,0 +1,15 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.9,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "oidfpolicy"
7
+ requires-python = ">=3.10"
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 oidfpolicy(m: &Bound<'_, PyModule>) -> PyResult<()> {
12
+ m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
13
+ Ok(())
14
+ }