Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
c171ed6
feat: Rewrite this repo to use pre-built c2pa_rs libraries and no dir…
gpeacock May 14, 2025
31fd9a7
Merge branch 'main' into gpeacock/no_rust
gpeacock May 14, 2025
2bb3def
fix: Add sdk_version and get the current value from version()
gpeacock May 14, 2025
97ad247
build: work in progress on build updates
gpeacock May 27, 2025
c68399c
feat: Update c2pa.py (#105)
tmathern May 29, 2025
44b5229
feat: Add autopep8 formatting
tmathern May 29, 2025
c843775
fix: Dev rebuild
tmathern May 29, 2025
e0b9bf3
fix: Install package from local
tmathern May 29, 2025
7fdb6e3
fix: Temp deactivation of tests to debug publishing
tmathern May 29, 2025
0b580e3
fix: split install and wheel build step
tmathern May 29, 2025
b885d6f
fix: Debug Linux build
tmathern May 29, 2025
e9ede9b
fix: Simplify deps graph
tmathern May 29, 2025
2a9911d
fix: Source dist
tmathern May 29, 2025
4380c4f
fix: Fix warning
tmathern May 29, 2025
a8ca466
fix: Restore macos_x86
tmathern May 29, 2025
5ad5832
fix: Restore macos_aarch64
tmathern May 29, 2025
737d418
fix: Restore windows step
tmathern May 29, 2025
251169f
fix: Introduce reusable workflow
tmathern May 29, 2025
13ccf44
fix: Permissions
tmathern May 29, 2025
883580a
fix: restore tests step
tmathern May 29, 2025
d46ab70
fix: Pytest is touchy about venv
tmathern May 29, 2025
650da56
fix: Missing deps
tmathern May 29, 2025
3c667f9
fix: split out windows tests
tmathern May 29, 2025
98f6216
fix: split out windows tests 2
tmathern May 29, 2025
8b3b3f6
fix: Rename steps
tmathern May 29, 2025
2368fa3
fix: Rename the steps
tmathern May 29, 2025
45a00d2
fix: Test graph
tmathern May 29, 2025
d2d8a7c
fix: name of actions
tmathern May 29, 2025
74b6793
fix: Missing params
tmathern May 29, 2025
f7111dd
fix; conditional check
tmathern May 29, 2025
d641cff
fix: auth requests to avoid rate limtis
tmathern May 29, 2025
3b9ff40
fix: Dirs
tmathern May 29, 2025
bf8d4aa
fix: test wheel
tmathern May 29, 2025
31d73b0
fix: Just build
tmathern May 29, 2025
0638914
fix: Test wheels
tmathern May 30, 2025
3bc7b26
fix: Debug build
tmathern May 30, 2025
7e04776
fix: Debug build
tmathern May 30, 2025
75783d1
fix: Debug build
tmathern May 30, 2025
9464426
fix: Debug build
tmathern May 30, 2025
5a4213c
fix: Debug build
tmathern May 30, 2025
a360278
fix: Debug build
tmathern May 30, 2025
b23bb1c
fix: Debug build
tmathern May 30, 2025
3c74b32
fix: Debug build
tmathern May 30, 2025
e322562
fix: Debug build
tmathern May 30, 2025
ac90962
fix: Version number check
tmathern May 30, 2025
86f697b
fix: Version mismatch issue
tmathern May 30, 2025
3ccc9f3
fix: Rename wheels
tmathern May 30, 2025
824ec7d
fix: Build change
tmathern May 30, 2025
c3b0fb4
fix: follow-up text processing fix
tmathern May 30, 2025
659cf01
fix: Drop bdist_wheel use
tmathern May 30, 2025
8129de2
fix: Missed a spot
tmathern May 30, 2025
c86dfdb
fix: License inclusion in wheel tweaks
tmathern May 30, 2025
472e1c3
fix: Add back the deny.toml file
tmathern May 30, 2025
2b7ffcb
fix: sdist build
tmathern May 30, 2025
4b035b9
fix: Clean up deps
tmathern May 30, 2025
ddfbd76
fix: setuptools bug handling
tmathern May 30, 2025
ed21cb9
fix: Better makefile
tmathern May 30, 2025
dda8a5d
fix: deps oversight
tmathern May 30, 2025
825f841
fix: Split deps
tmathern May 30, 2025
c51ca63
fix: Space typo
tmathern May 30, 2025
6ff7c78
fix: bump version
tmathern May 30, 2025
70f98d4
fix: Upload
tmathern May 30, 2025
266982d
fix: wheel upload debug
tmathern May 30, 2025
f758144
fix over-eager version up
tmathern May 30, 2025
4a8ea4d
fix over-eager version up
tmathern May 30, 2025
6abb067
fix over-eager version up
tmathern May 30, 2025
38d61a7
fix: upload of wheels
tmathern May 30, 2025
34aa16c
fix: upload of wheels
tmathern May 30, 2025
9c71f70
fix: upload of wheels
tmathern May 30, 2025
24c2465
fix: upload of wheels
tmathern May 30, 2025
2f844ed
fix: upload of wheels
tmathern May 30, 2025
b1b908b
fix: upload of wheels
tmathern May 30, 2025
8e73614
fix: upload of wheels
tmathern May 30, 2025
226bc77
fix: upload of wheels
tmathern May 30, 2025
9e320c9
fix: upload of wheels
tmathern May 30, 2025
d900d85
fix: upload of wheels
tmathern May 30, 2025
bb28119
fix: upload of wheels
tmathern May 30, 2025
db0d184
fix: upload of wheels
tmathern May 30, 2025
2af8e13
fix: upload of wheels
tmathern May 30, 2025
05aa171
fix: upload of wheels
tmathern May 30, 2025
5252007
fix: fix warning
tmathern May 30, 2025
2492b88
fix: upload of wheels
tmathern May 30, 2025
6ae1e65
fix: upload of wheels
tmathern May 30, 2025
85ebe7c
fix: upload of wheels
tmathern May 30, 2025
bf1b7c1
fix: upload of wheels
tmathern May 30, 2025
8f8361d
fix: upload of wheels
tmathern May 30, 2025
4b77a03
fix: upload of wheels
tmathern May 30, 2025
2fe7ad9
fix: upload of wheels
tmathern May 30, 2025
5da91d5
fix: upload of wheels
tmathern May 30, 2025
211ceeb
fix: upload of wheels
tmathern May 30, 2025
1e4c374
fix: upload of wheels
tmathern May 30, 2025
3f69012
fix: upload of wheels
tmathern May 30, 2025
382187b
feat: manylinux support (#109)
tmathern May 30, 2025
091758a
fix: upload of wheels
tmathern May 30, 2025
184584d
fix: upload of wheels
tmathern May 30, 2025
b981e45
fix: upload of wheels
tmathern May 30, 2025
71a1d8b
fix: upload of wheels
tmathern May 31, 2025
1a631ed
fix: upload of wheels
tmathern May 31, 2025
c40da61
fix: Update test setup
tmathern May 31, 2025
0a4c347
fix: upload of wheels
tmathern May 31, 2025
b2b3603
fix: merge commit
tmathern May 31, 2025
64deb67
fix: upload of wheels
tmathern May 31, 2025
b9a8f97
fix: upload of wheels
tmathern May 31, 2025
c4e36d4
fix: upload of wheels
tmathern May 31, 2025
f58304c
fix: upload of wheels
tmathern May 31, 2025
0f94d4c
fix: upload of wheels
tmathern May 31, 2025
62c0aa0
fix: Fix setups once more (#110)
tmathern May 31, 2025
ee12132
fix: Test
tmathern May 31, 2025
b3371b7
fix: Add test
tmathern May 31, 2025
f5623ab
fix: Refactor tests
tmathern May 31, 2025
bfdca20
fix: Reader test
tmathern May 31, 2025
1cc2e29
fix: Update readme
tmathern May 31, 2025
83f8af0
fix: Docs
tmathern May 31, 2025
15e0e22
fix: Refactor
tmathern May 31, 2025
905e4b2
fix: benchmark
tmathern May 31, 2025
2c9e44b
fix: CLeaning up
tmathern May 31, 2025
5ad9392
fix: Stream tests
tmathern May 31, 2025
d17f373
fix: Reader tests
tmathern May 31, 2025
4de674b
fix: Builder double close test
tmathern May 31, 2025
6e78c6c
fix: Clean up
tmathern May 31, 2025
3a51eae
Resolve merge conflict: Keep updated version of tests/_test_api.py fr…
tmathern May 31, 2025
84a6103
fix: Clean up
tmathern May 31, 2025
050ca3c
ci: Merge branch 'mathern/pypitest-setup' into mathern/manywheels
tmathern May 31, 2025
a47891a
fix: Remove debug logs
tmathern May 31, 2025
bd148f2
fix: Fix typo
tmathern May 31, 2025
dcb862c
fix: Stream exception
tmathern May 31, 2025
0b22cea
fix: docs & more tests (#111)
tmathern May 31, 2025
7273647
fix: Threaded reading
tmathern May 31, 2025
b61f5c5
fix: Threading tests
tmathern May 31, 2025
9620ff0
fix: Interleaved thread test
tmathern May 31, 2025
811cf93
fix: Threading
tmathern May 31, 2025
6f9544c
fix: More tests
tmathern May 31, 2025
9057f20
fix: Test updates
tmathern May 31, 2025
dbd3ad2
fix: Test updates
tmathern May 31, 2025
9abd7a7
fix: Add some async tests
tmathern May 31, 2025
04f240d
fix: Test updates
tmathern May 31, 2025
b8aefa8
fix: Test updates
tmathern May 31, 2025
862470e
fix: Test updates
tmathern May 31, 2025
1b08ff8
fix: Test updates
tmathern May 31, 2025
7c3a0b5
fix: Add ingredients tests
tmathern May 31, 2025
26b44ef
fix: Test ingredient
tmathern May 31, 2025
6ec6434
fix: Test ingredient
tmathern May 31, 2025
195322f
fix: Add ingredient from stream
tmathern May 31, 2025
bc616d2
fix: Ingredient from stream
tmathern May 31, 2025
f3f7f6c
fix: Reorder test
tmathern May 31, 2025
60ac0d8
fix: Thread
tmathern May 31, 2025
d1dad05
fix: Threading with asyncio
tmathern May 31, 2025
ad71126
fix: RUn all the tests
tmathern May 31, 2025
3dbf41f
fix: refactor tests
tmathern May 31, 2025
0e2e674
fix: refactor and format
tmathern May 31, 2025
19eaa2e
fix: refactor and format 2
tmathern May 31, 2025
dbad283
ci: Merge commit
tmathern May 31, 2025
c7decbe
fix: benchmark
tmathern May 31, 2025
92664d9
fix: FOrmat
tmathern May 31, 2025
3f8c8a7
fix: Add test for contention
tmathern May 31, 2025
9f73274
fix: Add test for contention 2
tmathern May 31, 2025
9d922f6
fix: Threads
tmathern Jun 2, 2025
811950a
fix: Paths use and some timing
tmathern Jun 2, 2025
3147903
fix: autopep8
tmathern Jun 2, 2025
2392e15
fix: Format
tmathern Jun 2, 2025
575821c
fix: Undo test formating as json formatting seems touchy
tmathern Jun 2, 2025
3d5e7e2
fix: test_read_ingredient_file
tmathern Jun 2, 2025
68ba961
fix: format
tmathern Jun 2, 2025
8cc4dc9
fix: format
tmathern Jun 2, 2025
b3d5926
fix: fix a bug found by tests
tmathern Jun 2, 2025
8bceb5b
fix: Refactor sign_file to use new API internally, but keep the emtho…
tmathern Jun 2, 2025
cb7187c
fix: Clean up
tmathern Jun 2, 2025
91d1b66
fix: CLean up
tmathern Jun 2, 2025
5dbc6a7
fix: Remove debug code
tmathern Jun 2, 2025
128508c
fix: Ignore deprecation warnings in test logs
tmathern Jun 2, 2025
9dddb72
fix: One more clean up
tmathern Jun 2, 2025
8f94192
fix: One more clean up
tmathern Jun 2, 2025
c19e8e2
feat: Prepare publishing flow to PyPi, increase test coverage (#108)
tmathern Jun 5, 2025
92af391
fix: Add tests for coverage
alextrnnn Jun 6, 2025
6f51e55
Merge branch 'gpeacock/no_rust' into tran/test-coverage
alextrnnn Jun 6, 2025
623f33a
fix: Release reader from memory and typo
alextrnnn Jun 6, 2025
4753686
fix: Merge conflict
tmathern Jun 6, 2025
8a3b7a2
fix: Reset settings that would cause other test to fail
alextrnnn Jun 9, 2025
9615099
Merge pull request #115 from contentauth/tran/test-coverage
alextrnnn Jun 9, 2025
2906d38
fix: Update authors
tmathern Jun 12, 2025
3c94a62
fix: Replace some tests values to use more modern assertions
tmathern Jun 12, 2025
fe1cf52
fix: Change assertion
tmathern Jun 12, 2025
6ec11f5
fix: Remove creative assertions
tmathern Jun 12, 2025
9a336dd
fix: Comment
tmathern Jun 12, 2025
a69be49
fix: Refactor path names usage in tests
tmathern Jun 13, 2025
838c97c
fix: Refactor path names usage in tests 2
tmathern Jun 13, 2025
1e9e75d
fix: Added a test case
tmathern Jun 13, 2025
39c937f
fix: Refactor benchmark
tmathern Jun 13, 2025
fdd7452
fix: Target PyPi for release isntead of testPyPi
tmathern Jun 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Build Wheel

on:
workflow_call:
inputs:
python-version:
required: true
type: string
architecture:
required: false
type: string
artifact-name:
required: true
type: string
runs-on:
required: true
type: string
default: 'ubuntu-latest'
c2pa-version:
required: true
type: string
secrets:
github-token:
required: true

permissions:
contents: read
packages: read
actions: read

env:
GITHUB_TOKEN: ${{ secrets.github-token }}
C2PA_VERSION: ${{ inputs.c2pa-version }}

jobs:
build:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4

- name: Build Linux wheels
if: runner.os == 'Linux'
run: |
# Create necessary directories
mkdir -p artifacts
mkdir -p src/c2pa/libs
rm -rf dist build

# Set Docker image and platform tag based on architecture
if [ "${{ inputs.architecture }}" = "aarch64" ]; then
DOCKER_IMAGE="quay.io/pypa/manylinux_2_28_aarch64"
PLATFORM_TAG="manylinux_2_28_aarch64"
else
DOCKER_IMAGE="quay.io/pypa/manylinux_2_28_x86_64"
PLATFORM_TAG="manylinux_2_28_x86_64"
fi

# Build wheel in Docker container
docker run --rm -v $PWD:/io $DOCKER_IMAGE bash -c "
yum install -y gcc gcc-c++ make &&
mkdir -p /io/artifacts /io/src/c2pa/libs &&
rm -rf /io/dist /io/build &&
cd /io &&
/opt/python/cp310-cp310/bin/pip install -r requirements.txt -r requirements-dev.txt &&
/opt/python/cp310-cp310/bin/pip install toml &&
C2PA_LIBS_PLATFORM=\"${{ inputs.architecture == 'aarch64' && 'aarch64-unknown-linux-gnu' || 'x86_64-unknown-linux-gnu' }}\" /opt/python/cp310-cp310/bin/python scripts/download_artifacts.py $C2PA_VERSION &&
for PYBIN in /opt/python/cp3{10,11}-*/bin; do
\${PYBIN}/pip install --upgrade pip wheel &&
\${PYBIN}/pip install toml &&
CFLAGS=\"-I/opt/python/cp310-cp310/include/python3.10\" LDFLAGS=\"-L/opt/python/cp310-cp310/lib\" \${PYBIN}/python setup.py bdist_wheel --plat-name $PLATFORM_TAG
done &&
rm -f /io/dist/*-linux_*.whl
"

# Verify the wheel was built
echo "Contents of dist directory:"
ls -la dist/
echo "Number of wheels found:"
find dist -name "*.whl" | wc -l
echo "Wheel filenames:"
find dist -name "*.whl" -exec basename {} \;

- name: Build Windows wheel (x64)
if: runner.os == 'Windows'
shell: pwsh
run: |
# Create necessary directories
New-Item -ItemType Directory -Force -Path artifacts
New-Item -ItemType Directory -Force -Path src/c2pa/libs
if (Test-Path dist) { Remove-Item -Recurse -Force dist }
if (Test-Path build) { Remove-Item -Recurse -Force build }

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install wheel

# Download native artifacts
Write-Host "Starting artifact download process..."
Write-Host "C2PA_VERSION: $env:C2PA_VERSION"

python scripts/download_artifacts.py "$env:C2PA_VERSION"

Write-Host "Artifacts directory contents:"
Get-ChildItem -Recurse -Path artifacts
Write-Host "src/c2pa/libs directory contents:"
Get-ChildItem -Recurse -Path src/c2pa/libs

# Build wheel
python setup.py bdist_wheel --plat-name win_amd64

- name: Build macOS wheel (Apple Silicon)
if: runner.os == 'macOS' && runner.arch == 'arm64'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need to support x86 macos, but it can probably wait for now.

Copy link
Collaborator

@tmathern tmathern Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can x86 support using the universal libs? I think so? That build target may be easier to get our hands on.

run: |
# Create necessary directories
mkdir -p artifacts
mkdir -p src/c2pa/libs
rm -rf dist build

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install wheel

# Download native artifacts
python scripts/download_artifacts.py $C2PA_VERSION

# Build wheel
python setup.py bdist_wheel --plat-name macosx_11_0_arm64

# Rename wheel to ensure unique filename
cd dist
for wheel in *.whl; do
mv "$wheel" "${wheel/macosx_11_0_arm64/macosx_11_0_arm64}"
done
cd ..

- name: Log wheel filename
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
run: |
echo "Built wheel:"
ls -l dist/*.whl

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: dist
if-no-files-found: error
Loading