Skip to content

Commit fe30c5c

Browse files
committed
fix: Build debug
1 parent b6d5fcc commit fe30c5c

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/build-wheel.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@ jobs:
6565
/opt/python/cp310-cp310/bin/pip install toml &&
6666
C2PA_LIBS_PLATFORM=\"${{ format('{0}', inputs.architecture == 'aarch64' && 'aarch64-unknown-linux-gnu' || 'x86_64-unknown-linux-gnu') }}\" /opt/python/cp310-cp310/bin/python scripts/download_artifacts.py $C2PA_VERSION &&
6767
/opt/python/cp310-cp310/bin/python -c \"import sys; sys.path.insert(0, '/io'); from setup import copy_platform_libraries; copy_platform_libraries('${{ format('{0}', inputs.architecture == 'aarch64' && 'aarch64-unknown-linux-gnu' || 'x86_64-unknown-linux-gnu') }}', clean_first=True)\" &&
68+
echo '[bdist_wheel]' > /io/setup.cfg &&
69+
echo 'plat-name = $PLATFORM_TAG' >> /io/setup.cfg &&
6870
for PYBIN in /opt/python/cp3{10,11}-*/bin; do
6971
\${PYBIN}/pip install --upgrade pip wheel build &&
7072
\${PYBIN}/pip install toml==0.10.2 &&
7173
\${PYBIN}/pip install setuptools==68.0.0 &&
72-
cd /io && _PYTHON_HOST_PLATFORM=$PLATFORM_TAG \${PYBIN}/python -m build --wheel
74+
cd /io && \${PYBIN}/python -m build --wheel
7375
done &&
76+
rm -f /io/setup.cfg &&
7477
rm -f /io/dist/*-linux_*.whl
7578
"
7679
@@ -182,8 +185,17 @@ jobs:
182185
# Copy libraries to package directory
183186
python -c "import sys; sys.path.insert(0, '.'); from setup import copy_platform_libraries; copy_platform_libraries('$RUST_PLATFORM', clean_first=True)"
184187
185-
# Build wheel using modern build tool with platform override
186-
_PYTHON_HOST_PLATFORM="$PLATFORM_NAME" python -m build --wheel
188+
# Create setup.cfg to specify platform for bdist_wheel
189+
cat > setup.cfg << EOF
190+
[bdist_wheel]
191+
plat-name = $PLATFORM_NAME
192+
EOF
193+
194+
# Build wheel using modern build tool
195+
python -m build --wheel
196+
197+
# Clean up setup.cfg
198+
rm -f setup.cfg
187199
188200
# Verify wheel structure
189201
echo "Verifying wheels using twine check"

0 commit comments

Comments
 (0)