diff --git a/pyproject.toml b/pyproject.toml index f178c63f..57d4368a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "c2pa-python" -version = "0.15.0" +version = "0.16.0" requires-python = ">=3.10" description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library" readme = { file = "README.md", content-type = "text/markdown" } diff --git a/requirements-dev.txt b/requirements-dev.txt index 148567ba..6533001f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,4 +16,4 @@ autopep8==2.0.4 # For automatic code formatting flake8==7.3.0 # Test dependencies (for callback signers) -cryptography==45.0.4 \ No newline at end of file +cryptography==45.0.6 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4334b02c..5d47321e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # only used in the training example -cryptography>=45.0.3 +cryptography>=45.0.6 diff --git a/scripts/download_artifacts.py b/scripts/download_artifacts.py index 3da65246..44188a07 100644 --- a/scripts/download_artifacts.py +++ b/scripts/download_artifacts.py @@ -1,4 +1,18 @@ #!/usr/bin/env python3 + +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, +# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# or the MIT license (http://opensource.org/licenses/MIT), +# at your option. + +# Unless required by applicable law or agreed to in writing, +# this software is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or +# implied. See the LICENSE-MIT and LICENSE-APACHE files for the +# specific language governing permissions and limitations under +# each license. + import os import sys import requests diff --git a/setup.py b/setup.py index 03fccaa2..7a3b3339 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,16 @@ +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, +# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# or the MIT license (http://opensource.org/licenses/MIT), +# at your option. + +# Unless required by applicable law or agreed to in writing, +# this software is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or +# implied. See the LICENSE-MIT and LICENSE-APACHE files for the +# specific language governing permissions and limitations under +# each license. + from setuptools import setup, find_namespace_packages import sys import platform diff --git a/src/c2pa/__init__.py b/src/c2pa/__init__.py index 3fa137f5..c2a89d73 100644 --- a/src/c2pa/__init__.py +++ b/src/c2pa/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, +# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# or the MIT license (http://opensource.org/licenses/MIT), +# at your option. + +# Unless required by applicable law or agreed to in writing, +# this software is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or +# implied. See the LICENSE-MIT and LICENSE-APACHE files for the +# specific language governing permissions and limitations under +# each license. + try: from importlib.metadata import version __version__ = version("c2pa-python") diff --git a/src/c2pa/build.py b/src/c2pa/build.py index 3ee6107b..96c4c245 100644 --- a/src/c2pa/build.py +++ b/src/c2pa/build.py @@ -1,3 +1,16 @@ +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, +# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# or the MIT license (http://opensource.org/licenses/MIT), +# at your option. + +# Unless required by applicable law or agreed to in writing, +# this software is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or +# implied. See the LICENSE-MIT and LICENSE-APACHE files for the +# specific language governing permissions and limitations under +# each license. + import os import sys import requests diff --git a/src/c2pa/c2pa.py b/src/c2pa/c2pa.py index 0edc61bb..aeb1427c 100644 --- a/src/c2pa/c2pa.py +++ b/src/c2pa/c2pa.py @@ -1,3 +1,16 @@ +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, +# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +# or the MIT license (http://opensource.org/licenses/MIT), +# at your option. + +# Unless required by applicable law or agreed to in writing, +# this software is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or +# implied. See the LICENSE-MIT and LICENSE-APACHE files for the +# specific language governing permissions and limitations under +# each license. + import ctypes import enum import json diff --git a/tests/benchmark.py b/tests/benchmark.py index afb9a191..c576c272 100644 --- a/tests/benchmark.py +++ b/tests/benchmark.py @@ -9,7 +9,7 @@ # WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or # implied. See the LICENSE-MIT and LICENSE-APACHE files for the # specific language governing permissions and limitations under -# each license.import unittest +# each license. import os import io @@ -110,7 +110,7 @@ def test_files_build(): if os.path.exists(output_path): os.remove(output_path) with open(test_path, "rb") as source_file: - with open(output_path, "wb") as dest_file: + with open(output_path, "w+b") as dest_file: builder.sign(signer, "image/jpeg", source_file, dest_file) diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index bd97d623..00000000 --- a/tests/conftest.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2025 Adobe. All rights reserved. -# This file is licensed to you under the Apache License, -# Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) -# or the MIT license (http://opensource.org/licenses/MIT), -# at your option. - -# Unless required by applicable law or agreed to in writing, -# this software is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or -# implied. See the LICENSE-MIT and LICENSE-APACHE files for the -# specific language governing permissions and limitations under -# each license.import unittest - -import os -import sys -import pytest - -@pytest.fixture -def fixtures_dir(): - """Provide the path to the fixtures directory.""" - return os.path.join(os.path.dirname(__file__), "fixtures") - -pytest.fixture(scope="session", autouse=True) -def setup_c2pa_library(): - """Ensure the src/c2pa library path is added to sys.path.""" - c2pa_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../src/c2pa")) - if c2pa_path not in sys.path: - sys.path.insert(0, c2pa_path) \ No newline at end of file diff --git a/tests/test_unit_tests.py b/tests/test_unit_tests.py index 3bf4b6c0..7540d35f 100644 --- a/tests/test_unit_tests.py +++ b/tests/test_unit_tests.py @@ -9,7 +9,7 @@ # WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or # implied. See the LICENSE-MIT and LICENSE-APACHE files for the # specific language governing permissions and limitations under -# each license.import unittest +# each license. import os import io diff --git a/tests/test_unit_tests_threaded.py b/tests/test_unit_tests_threaded.py index c5127404..3d3b6f1e 100644 --- a/tests/test_unit_tests_threaded.py +++ b/tests/test_unit_tests_threaded.py @@ -9,7 +9,7 @@ # WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or # implied. See the LICENSE-MIT and LICENSE-APACHE files for the # specific language governing permissions and limitations under -# each license.import unittest +# each license. import os import io