Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 20 additions & 4 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ jobs:
rm -f /io/dist/*-linux_*.whl
"

# Install twine to verify wheels
pip install twine

# Verify the wheel was built
echo "Contents of dist directory:"
ls -la dist/
Expand All @@ -81,6 +84,10 @@ jobs:
echo "Wheel filenames:"
find dist -name "*.whl" -exec basename {} \;

# Verify wheel structure
echo "Verifying wheels using twine check"
twine check dist/*

- name: Build Windows wheel (x64)
if: runner.os == 'Windows'
shell: pwsh
Expand All @@ -95,6 +102,7 @@ jobs:
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install wheel
pip install twine

# Download native artifacts
Write-Host "Starting artifact download process..."
Expand All @@ -110,8 +118,11 @@ jobs:
# Build wheel
python setup.py bdist_wheel --plat-name win_amd64

- name: Build macOS wheel (Apple Silicon)
if: runner.os == 'macOS' && runner.arch == 'arm64'
# Verify wheel structure
twine check dist/*

- name: Build macOS wheel (Universal)
if: runner.os == 'macOS'
run: |
# Create necessary directories
mkdir -p artifacts
Expand All @@ -122,20 +133,25 @@ jobs:
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install wheel
pip install twine

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

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

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

# Verify wheel structure
echo "Verifying wheels using twine check"
twine check dist/*

- name: Log wheel filename
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,19 +326,23 @@ jobs:
.\venv\Scripts\pytest .\tests\test_unit_tests.py -v

build-macos-wheel:
name: Build macOS wheel
name: Build macOS wheel (Universal)
uses: ./.github/workflows/build-wheel.yml
needs: [tests-unix, read-version]
with:
python-version: "3.10"
artifact-name: wheels-macos-${{ matrix.target }}
runs-on: macos-latest
artifact-name: wheels-macos-${{ matrix.target }}
architecture: ${{ matrix.target }}
c2pa-version: ${{ needs.read-version.outputs.c2pa-native-version }}
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
target: [aarch64]
include:
- target: universal2
runs-on: macos-latest

if: |
github.event_name != 'pull_request' ||
github.event.pull_request.author_association == 'COLLABORATOR' ||
Expand All @@ -347,12 +351,17 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'safe to test')

test-built-macos-wheel:
name: Test macOS built wheel
name: Test macOS built wheel (Universal)
needs: build-macos-wheel
runs-on: macos-latest
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
target: [aarch64]
include:
- target: universal2
runs-on: macos-latest
- target: universal2
runs-on: macos-13

if: |
github.event_name != 'pull_request' ||
github.event.pull_request.author_association == 'COLLABORATOR' ||
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/upload-test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "c2pa-python"
version = "0.14.0"
version = "0.15.0"
requires-python = ">=3.10"
description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library"
readme = { file = "README.md", content-type = "text/markdown" }
Expand Down
Loading