c2pa-python 0.37.12__tar.gz → 0.39.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.
Files changed (23) hide show
  1. {c2pa_python-0.37.12/src/c2pa_python.egg-info → c2pa_python-0.39.0}/PKG-INFO +8 -3
  2. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/README.md +6 -2
  3. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/pyproject.toml +2 -1
  4. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/setup.py +24 -27
  5. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa/__init__.py +2 -4
  6. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa/c2pa.py +1242 -544
  7. {c2pa_python-0.37.12 → c2pa_python-0.39.0/src/c2pa_python.egg-info}/PKG-INFO +8 -3
  8. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa_python.egg-info/SOURCES.txt +2 -1
  9. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa_python.egg-info/requires.txt +1 -0
  10. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/tests/test_unit_tests.py +981 -348
  11. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/tests/test_unit_tests_threaded.py +1719 -517
  12. c2pa_python-0.39.0/tests/test_versioned_docs.py +209 -0
  13. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/LICENSE-APACHE +0 -0
  14. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/LICENSE-MIT +0 -0
  15. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/MANIFEST.in +0 -0
  16. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/requirements.txt +0 -0
  17. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/scripts/download_artifacts.py +0 -0
  18. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/setup.cfg +0 -0
  19. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa/build.py +0 -0
  20. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa/lib.py +0 -0
  21. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa_python.egg-info/dependency_links.txt +0 -0
  22. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa_python.egg-info/entry_points.txt +0 -0
  23. {c2pa_python-0.37.12 → c2pa_python-0.39.0}/src/c2pa_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: c2pa-python
3
- Version: 0.37.12
3
+ Version: 0.39.0
4
4
  Summary: Python bindings for the C2PA Content Authenticity Initiative (CAI) library
5
5
  Author-email: Gavin Peacock <gvnpeacock@adobe.com>, Tania Mathern <mathern@adobe.com>
6
6
  Maintainer-email: Gavin Peacock <gpeacock@adobe.com>, Tania Mathern <mathern@adobe.com>
@@ -15,6 +15,7 @@ Requires-Python: >=3.10
15
15
  Description-Content-Type: text/markdown
16
16
  Requires-Dist: toml>=0.10.2
17
17
  Requires-Dist: cryptography>=41.0.0
18
+ Requires-Dist: certifi>=2026.10.19
18
19
  Requires-Dist: requests>=2.0.0
19
20
  Dynamic: requires-python
20
21
 
@@ -118,9 +119,13 @@ See the [`examples` directory](https://github.com/contentauth/c2pa-python/tree/m
118
119
 
119
120
  ## API reference documentation
120
121
 
121
- Documentation is published at [github.io/c2pa-python/api/c2pa](https://contentauth.github.io/c2pa-python/api/c2pa/index.html).
122
+ API documentation is published at [github.io/c2pa-python/api/c2pa](https://contentauth.github.io/c2pa-python/api/c2pa/index.html).
122
123
 
123
- To build documentation locally, refer to [this section in Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).
124
+ Use the documentation version dropdown to choose a published release.
125
+ The versions are selected in `api-docs/versions.json`; the first entry is the default at the existing documentation URL.
126
+ Publishing a stable GitHub release automatically adds its tag as the default while retaining older versions.
127
+
128
+ To build documentation locally, see [Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).
124
129
 
125
130
  ## Contributing
126
131
 
@@ -98,9 +98,13 @@ See the [`examples` directory](https://github.com/contentauth/c2pa-python/tree/m
98
98
 
99
99
  ## API reference documentation
100
100
 
101
- Documentation is published at [github.io/c2pa-python/api/c2pa](https://contentauth.github.io/c2pa-python/api/c2pa/index.html).
101
+ API documentation is published at [github.io/c2pa-python/api/c2pa](https://contentauth.github.io/c2pa-python/api/c2pa/index.html).
102
102
 
103
- To build documentation locally, refer to [this section in Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).
103
+ Use the documentation version dropdown to choose a published release.
104
+ The versions are selected in `api-docs/versions.json`; the first entry is the default at the existing documentation URL.
105
+ Publishing a stable GitHub release automatically adds its tag as the default while retaining older versions.
106
+
107
+ To build documentation locally, see [Contributing to the project](https://github.com/contentauth/c2pa-python/blob/main/docs/project-contributions.md#api-reference-documentation).
104
108
 
105
109
  ## Contributing
106
110
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "c2pa-python"
7
- version = "0.37.12"
7
+ version = "0.39.0"
8
8
  requires-python = ">=3.10"
9
9
  description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library"
10
10
  readme = { file = "README.md", content-type = "text/markdown" }
@@ -24,6 +24,7 @@ urls = {homepage = "https://contentauthenticity.org", repository = "https://gith
24
24
  dependencies = [
25
25
  "toml>=0.10.2",
26
26
  "cryptography>=41.0.0",
27
+ "certifi>=2026.10.19",
27
28
  "requests>=2.0.0"
28
29
  ]
29
30
 
@@ -26,24 +26,16 @@ def get_version():
26
26
  VERSION = get_version()
27
27
  PACKAGE_NAME = "c2pa-python" # Define package name as a constant
28
28
 
29
- # Define platform to library extension mapping (for reference only)
30
- PLATFORM_EXTENSIONS = {
31
- 'win_amd64': 'dll',
32
- 'win_arm64': 'dll',
33
- 'apple-darwin': 'dylib', # universal
34
- 'linux_x86_64': 'so',
35
- 'linux_aarch64': 'so',
36
- }
37
-
38
- # Based on what c2pa-rs repo publishes
29
+ # Based on what c2pa-rs repo publishes: each platform folder and the
30
+ # native library in it that src/c2pa/lib.py loads
39
31
  PLATFORM_FOLDERS = {
40
- 'universal-apple-darwin': 'dylib',
41
- 'aarch64-apple-darwin': 'dylib',
42
- 'x86_64-apple-darwin': 'dylib',
43
- 'x86_64-pc-windows-msvc': 'dll',
44
- 'aarch64-pc-windows-msvc': 'dll',
45
- 'x86_64-unknown-linux-gnu': 'so',
46
- 'aarch64-unknown-linux-gnu': 'so',
32
+ 'universal-apple-darwin': 'libc2pa_c.dylib',
33
+ 'aarch64-apple-darwin': 'libc2pa_c.dylib',
34
+ 'x86_64-apple-darwin': 'libc2pa_c.dylib',
35
+ 'x86_64-pc-windows-msvc': 'c2pa_c.dll',
36
+ 'aarch64-pc-windows-msvc': 'c2pa_c.dll',
37
+ 'x86_64-unknown-linux-gnu': 'libc2pa_c.so',
38
+ 'aarch64-unknown-linux-gnu': 'libc2pa_c.so',
47
39
  }
48
40
 
49
41
  # Directory structure
@@ -118,7 +110,12 @@ def get_current_platform():
118
110
  return "linux_x86_64"
119
111
 
120
112
  def copy_platform_libraries(platform_name, clean_first=False):
121
- """Copy libraries for a specific platform to the package libs directory.
113
+ """Copy the native library for a specific platform to the package libs directory.
114
+
115
+ Only the library loaded at runtime is copied. The native Rust lib release archives
116
+ also contain static libraries, debug symbols and build metadata
117
+ (.lib, .rlib, .pdb, .dSYM, .d), which are not needed and would otherwise
118
+ end up in the wheel.
122
119
 
123
120
  Args:
124
121
  platform_name: The platform to copy libraries for
@@ -126,14 +123,17 @@ def copy_platform_libraries(platform_name, clean_first=False):
126
123
  """
127
124
  platform_dir = ARTIFACTS_DIR / platform_name
128
125
 
129
- # Ensure the platform directory exists and contains files
126
+ # Ensure the platform directory exists and contains the library
130
127
  if not platform_dir.exists():
131
128
  raise ValueError(f"Platform directory not found: {platform_dir}")
132
129
 
133
- # Get list of all files in the platform directory
134
- platform_files = list(platform_dir.glob('*'))
135
- if not platform_files:
136
- raise ValueError(f"No files found in platform directory: {platform_dir}")
130
+ library_name = PLATFORM_FOLDERS.get(platform_name)
131
+ if library_name is None:
132
+ raise ValueError(f"Unknown platform: {platform_name}")
133
+
134
+ library_file = platform_dir / library_name
135
+ if not library_file.is_file():
136
+ raise ValueError(f"Native library not found: {library_file}")
137
137
 
138
138
  # Clean and recreate the package libs directory if requested
139
139
  if clean_first and PACKAGE_LIBS_DIR.exists():
@@ -142,10 +142,7 @@ def copy_platform_libraries(platform_name, clean_first=False):
142
142
  # Ensure the package libs directory exists
143
143
  PACKAGE_LIBS_DIR.mkdir(parents=True, exist_ok=True)
144
144
 
145
- # Copy files from platform-specific directory to the package libs directory
146
- for file in platform_files:
147
- if file.is_file():
148
- shutil.copy2(file, PACKAGE_LIBS_DIR / file.name)
145
+ shutil.copy2(library_file, PACKAGE_LIBS_DIR / library_file.name)
149
146
 
150
147
  def find_available_platforms():
151
148
  """Scan the artifacts directory for available platform-specific libraries."""
@@ -31,8 +31,7 @@ from .c2pa import (
31
31
  Context,
32
32
  ContextBuilder,
33
33
  ContextProvider,
34
- sdk_version,
35
- load_settings
34
+ sdk_version
36
35
  ) # NOQA
37
36
 
38
37
  # Re-export C2paError and its subclasses
@@ -50,6 +49,5 @@ __all__ = [
50
49
  'Context',
51
50
  'ContextBuilder',
52
51
  'ContextProvider',
53
- 'sdk_version',
54
- 'load_settings'
52
+ 'sdk_version'
55
53
  ]