Skip to content

Commit 31fd9a7

Browse files
committed
Merge branch 'main' into gpeacock/no_rust
2 parents c171ed6 + ea5950f commit 31fd9a7

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,21 +359,28 @@ jobs:
359359

360360
release:
361361
name: Release
362-
363362
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
364-
365363
runs-on: ubuntu-latest
366-
environment: Publish
364+
environment: pypipublish
367365
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
366+
permissions:
367+
id-token: write
368+
contents: read
368369
steps:
370+
- uses: actions/checkout@v4
369371
- uses: actions/download-artifact@v4
370372
with:
371373
pattern: wheels-*
372-
name: wheels
374+
path: dist
375+
merge-multiple: true
376+
- name: List contents of dist directory
377+
run: ls -la dist/
373378
- name: Publish to PyPI
374-
uses: PyO3/maturin-action@v1
375-
env:
376-
MATURIN_PYPI_TOKEN: ${{ secrets.caipypi }}
379+
uses: pypa/gh-action-pypi-publish@release/v1
377380
with:
378-
command: upload
379-
args: --non-interactive --skip-existing *
381+
packages-dir: dist
382+
# verbose: true
383+
# print-hash: true
384+
# Uncomment below for test runs, otherwise fails on existing packages being reuploaded
385+
skip-existing: true
386+

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ allow = [
3939
"Unicode-DFS-2016",
4040
"Unicode-3.0",
4141
"Zlib",
42+
"CDLA-Permissive-2.0",
4243
]
4344
confidence-threshold = 0.9
4445

pyproject.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ requires = ["setuptools>=68.0.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "c2pa"
6+
name = "c2pa-python"
77
version = "0.10.0"
8-
description = "Python bindings for the C2PA library"
8+
requires-python = ">=3.8"
9+
description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library"
10+
readme = { file = "README.md", content-type = "text/markdown" }
911
license = {file = "LICENSE-MIT"}
10-
readme = "README.md"
1112
authors = [{ name = "Gavin Peacock", email = "[email protected]" }]
1213
classifiers = [
1314
"Programming Language :: Python :: 3",
@@ -20,10 +21,9 @@ maintainers = [
2021
]
2122
urls = {homepage = "https://contentauthenticity.org", repository = "https://github.com/contentauth/c2pa-python"}
2223

23-
requires-python = ">=3.8"
24-
dependencies = [
25-
"cryptography>=41.0.0",
26-
"pytest>=7.4.0"
24+
[project.optional-dependencies]
25+
test = [
26+
"pytest < 5.0.0"
2727
]
2828

2929
[project.scripts]
@@ -33,4 +33,5 @@ download-artifacts = "c2pa.build:download_artifacts"
3333
packages = ["src/c2pa"]
3434

3535
[tool.hatch.build.hooks.custom]
36-
path = "c2pa/build.py"
36+
path = "c2pa/build.py"
37+

tests/_test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def getitem(d, key):
6363

6464
class TestC2paSdk(unittest.TestCase):
6565
def test_version(self):
66-
assert version() == "0.8.2"
66+
assert version() == "0.9.0"
6767

6868
def test_sdk_version(self):
6969
assert "c2pa-rs/" in sdk_version()

tests/test_unit_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
testPath = os.path.join(PROJECT_PATH, "tests", "fixtures", "C.jpg")
2525

26-
# class TestC2paSdk(unittest.TestCase):
27-
# def test_version(self):
28-
# print(sdk_version())
29-
# self.assertIn("0.8.0", sdk_version())
26+
class TestC2paSdk(unittest.TestCase):
27+
def test_version(self):
28+
self.assertIn("0.9.0", sdk_version())
29+
3030

3131
class TestReader(unittest.TestCase):
3232
def setUp(self):

0 commit comments

Comments
 (0)