c2pa-python 0.4.0__tar.gz → 0.5.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.
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/.github/workflows/build.yml +34 -14
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/.gitignore +2 -0
- c2pa_python-0.5.0/.vscode/settings.json +6 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/Cargo.lock +986 -411
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/Cargo.toml +5 -3
- c2pa_python-0.5.0/PKG-INFO +340 -0
- c2pa_python-0.5.0/README.md +317 -0
- c2pa_python-0.5.0/c2pa/__init__.py +17 -0
- c2pa_python-0.5.0/c2pa/c2pa_api/__init__.py +1 -0
- c2pa_python-0.5.0/c2pa/c2pa_api/c2pa_api.py +224 -0
- c2pa_python-0.5.0/src/c2pa.udl +96 -0
- c2pa_python-0.5.0/src/callback_signer.rs +56 -0
- c2pa_python-0.5.0/src/error.rs +126 -0
- c2pa_python-0.5.0/src/json_api.rs +115 -0
- c2pa_python-0.5.0/src/lib.rs +190 -0
- c2pa_python-0.5.0/src/signer_info.rs +60 -0
- c2pa_python-0.5.0/src/streams.rs +166 -0
- c2pa_python-0.5.0/src/test_stream.rs +85 -0
- c2pa_python-0.5.0/tests/fixtures/A_thumbnail.jpg +0 -0
- c2pa_python-0.5.0/tests/fixtures/ps256.pem +53 -0
- c2pa_python-0.5.0/tests/fixtures/ps256.pub +113 -0
- c2pa_python-0.5.0/tests/test_api.py +126 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/tests/training.py +46 -15
- c2pa_python-0.5.0/tests/unit_tests.py +116 -0
- c2pa_python-0.4.0/PKG-INFO +0 -251
- c2pa_python-0.4.0/README.md +0 -228
- c2pa_python-0.4.0/src/c2pa.udl +0 -39
- c2pa_python-0.4.0/src/lib.rs +0 -25
- c2pa_python-0.4.0/tests/test_c2pa.py +0 -152
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/CODE_OF_CONDUCT.md +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/CONTRIBUTING.md +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/LICENSE-APACHE +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/LICENSE-MIT +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/build.rs +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/pyproject.toml +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/requirements.txt +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/tests/fixtures/A.jpg +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/tests/fixtures/C.jpg +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/tests/fixtures/es256_certs.pem +0 -0
- {c2pa_python-0.4.0 → c2pa_python-0.5.0}/tests/fixtures/es256_private.key +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
name: Build
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
+
pull_request:
|
|
4
5
|
push:
|
|
5
6
|
branches:
|
|
6
7
|
- main
|
|
7
8
|
tags:
|
|
8
9
|
- "*"
|
|
9
10
|
workflow_dispatch:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
inputs:
|
|
12
|
+
publish:
|
|
13
|
+
description: 'Publish'
|
|
14
|
+
required: true
|
|
15
|
+
default: 'false'
|
|
13
16
|
|
|
14
17
|
jobs:
|
|
15
18
|
linux:
|
|
@@ -18,8 +21,8 @@ jobs:
|
|
|
18
21
|
matrix:
|
|
19
22
|
target: [x86_64, aarch64]
|
|
20
23
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
22
|
-
- uses: actions/setup-python@
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
23
26
|
with:
|
|
24
27
|
python-version: "3.10"
|
|
25
28
|
cache: "pip"
|
|
@@ -35,7 +38,24 @@ jobs:
|
|
|
35
38
|
args: --release --out dist --find-interpreter
|
|
36
39
|
sccache: "true"
|
|
37
40
|
manylinux: ${{ matrix.target == 'aarch64' && 'manylinux_2_28' || 'auto' }}
|
|
38
|
-
before-script-linux:
|
|
41
|
+
before-script-linux: |
|
|
42
|
+
pip install uniffi-bindgen==0.24.1
|
|
43
|
+
|
|
44
|
+
# ISSUE: https://github.com/sfackler/rust-openssl/issues/2036#issuecomment-1724324145
|
|
45
|
+
# If we're running on rhel centos, install needed packages.
|
|
46
|
+
if command -v yum &> /dev/null; then
|
|
47
|
+
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
|
|
48
|
+
|
|
49
|
+
# If we're running on i686 we need to symlink libatomic
|
|
50
|
+
# in order to build openssl with -latomic flag.
|
|
51
|
+
if [[ ! -d "/usr/lib64" ]]; then
|
|
52
|
+
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
|
|
53
|
+
fi
|
|
54
|
+
else
|
|
55
|
+
# If we're running on debian-based system.
|
|
56
|
+
apt update -y && apt-get install -y libssl-dev openssl pkg-config
|
|
57
|
+
fi
|
|
58
|
+
|
|
39
59
|
- name: Upload wheels
|
|
40
60
|
uses: actions/upload-artifact@v3
|
|
41
61
|
with:
|
|
@@ -48,8 +68,8 @@ jobs:
|
|
|
48
68
|
matrix:
|
|
49
69
|
target: [x64, x86]
|
|
50
70
|
steps:
|
|
51
|
-
- uses: actions/checkout@
|
|
52
|
-
- uses: actions/setup-python@
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
- uses: actions/setup-python@v5
|
|
53
73
|
with:
|
|
54
74
|
python-version: '3.10'
|
|
55
75
|
architecture: ${{ matrix.target }}
|
|
@@ -70,8 +90,8 @@ jobs:
|
|
|
70
90
|
macos_x86:
|
|
71
91
|
runs-on: macos-latest
|
|
72
92
|
steps:
|
|
73
|
-
- uses: actions/checkout@
|
|
74
|
-
- uses: actions/setup-python@
|
|
93
|
+
- uses: actions/checkout@v4
|
|
94
|
+
- uses: actions/setup-python@v5
|
|
75
95
|
with:
|
|
76
96
|
python-version: '3.10'
|
|
77
97
|
cache: "pip"
|
|
@@ -91,8 +111,8 @@ jobs:
|
|
|
91
111
|
macos_aarch64:
|
|
92
112
|
runs-on: macos-latest-large
|
|
93
113
|
steps:
|
|
94
|
-
- uses: actions/checkout@
|
|
95
|
-
- uses: actions/setup-python@
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: actions/setup-python@v5
|
|
96
116
|
with:
|
|
97
117
|
python-version: '3.10'
|
|
98
118
|
cache: "pip"
|
|
@@ -112,7 +132,7 @@ jobs:
|
|
|
112
132
|
sdist:
|
|
113
133
|
runs-on: ubuntu-latest
|
|
114
134
|
steps:
|
|
115
|
-
- uses: actions/checkout@
|
|
135
|
+
- uses: actions/checkout@v4
|
|
116
136
|
- name: Build sdist
|
|
117
137
|
uses: PyO3/maturin-action@v1
|
|
118
138
|
with:
|
|
@@ -128,7 +148,7 @@ jobs:
|
|
|
128
148
|
name: Release
|
|
129
149
|
runs-on: ubuntu-latest
|
|
130
150
|
environment: Publish
|
|
131
|
-
if:
|
|
151
|
+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
|
|
132
152
|
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
|
|
133
153
|
steps:
|
|
134
154
|
- uses: actions/download-artifact@v3
|