Skip to content

Commit 7208162

Browse files
committed
fix: force platform-specific wheels instead of py3-none-any
- Add setup.py with BinaryDistribution to mark package as platform-specific - This ensures manylinux wheels include architecture (manylinux_2_17_x86_64 vs manylinux_2_17_aarch64) - Download wheels separately (merge-multiple: false) to prevent filename collisions - Fixes issue where both linux/amd64 and linux/arm64 created identical py3-none-any.whl filenames
1 parent d8e1ff3 commit 7208162

3 files changed

Lines changed: 46 additions & 3 deletions

File tree

.github/workflows/release-python-packages.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ jobs:
9898
name: wheel-${{ matrix.platform }}-test
9999
path: dist/
100100

101+
- name: Verify wheel was downloaded
102+
shell: bash
103+
run: |
104+
echo "📦 Checking for wheel-${{ matrix.platform }}-test..."
105+
ls -lh dist/
106+
if [ ! -f dist/*.whl ]; then
107+
echo "❌ No wheel found for ${{ matrix.platform }}!"
108+
exit 1
109+
fi
110+
echo "✅ Wheel found for ${{ matrix.platform }}"
111+
101112
- name: Re-upload wheel for release
102113
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
103114
with:
@@ -113,12 +124,21 @@ jobs:
113124
permissions:
114125
id-token: write
115126
steps:
116-
- name: Download all wheels
127+
- name: Download all wheels (separately to avoid overwrites)
117128
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
118129
with:
119130
pattern: wheel-*
120-
path: dist/
121-
merge-multiple: true
131+
path: wheels-temp/
132+
merge-multiple: false # Keep in separate directories
133+
134+
- name: Collect wheels into single directory
135+
shell: bash
136+
run: |
137+
mkdir -p dist
138+
# Copy all wheels from subdirectories to dist/
139+
find wheels-temp -name "*.whl" -exec cp {} dist/ \;
140+
echo "📦 Collected wheels:"
141+
ls -lh dist/
122142
123143
- name: Verify wheels
124144
run: |

bindings/python/Dockerfile.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ COPY --from=jre-builder /build/jre /build/jre/
105105
# Copy Python bindings source
106106
COPY bindings/python/src ./src
107107
COPY bindings/python/tests ./tests
108+
COPY bindings/python/setup.py .
108109
COPY bindings/python/setup_jars.py .
109110
COPY bindings/python/extract_version.py .
110111
COPY bindings/python/write_version.py .

bindings/python/setup.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""
2+
Setup configuration for arcadedb-embedded.
3+
4+
This file forces the wheel to be platform-specific (not py3-none-any)
5+
because we bundle platform-specific JRE binaries.
6+
"""
7+
8+
from setuptools import setup
9+
from setuptools.dist import Distribution
10+
11+
12+
class BinaryDistribution(Distribution):
13+
"""Mark package as having platform-specific content."""
14+
15+
def has_ext_modules(self):
16+
# Return True to indicate this is a platform-specific package
17+
# even though we don't have C extensions
18+
return True
19+
20+
21+
# All other configuration is in pyproject.toml
22+
setup(distclass=BinaryDistribution)

0 commit comments

Comments
 (0)