Skip to content

Commit 740fe00

Browse files
authored
Merge pull request #16 from SaiSandeepKantareddy/main
Add macOS x86_64 wheel support and prevent broken sdist fallback
2 parents 511c5cb + 102647f commit 740fe00

3 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
# Platforms supported:
4141
# - Linux x86_64 (manylinux_2_17)
4242
# - macOS ARM64 (Apple Silicon)
43+
# - macOS x86_64 (Intel)
4344
# - Windows x64
4445
#
4546
# Python versions supported: 3.9, 3.10, 3.11, 3.12, 3.13
@@ -99,6 +100,11 @@ jobs:
99100
target: aarch64-apple-darwin
100101
wheel_platform: macosx_11_0_arm64
101102
archive_ext: tar.gz
103+
104+
- os: macos-13
105+
target: x86_64-apple-darwin
106+
wheel_platform: macosx_10_15_x86_64
107+
archive_ext: tar.gz
102108

103109
- os: windows-latest
104110
target: x86_64-pc-windows-msvc
@@ -403,6 +409,7 @@ jobs:
403409
404410
- ✅ **Linux x86_64** (manylinux_2_17_x86_64)
405411
- ✅ **macOS ARM64** (Apple Silicon, macosx_11_0_arm64)
412+
- ✅ **macOS x86_64** (Intel, macosx_10_15_x86_64)
406413
- ✅ **Windows x64** (win_amd64)
407414
408415
### Python Version Support
@@ -422,7 +429,7 @@ jobs:
422429
423430
### Source Distribution
424431
425-
The source distribution (`.tar.gz`) is also available for custom builds, though binaries are not included and would need to be obtained separately from the main SochDB repository.
432+
The source distribution (`.tar.gz`) is attached to the GitHub release for maintainers and custom builds, but it is intentionally not uploaded to PyPI while unsupported platform combinations can still fall back to a broken binary mix.
426433
427434
---
428435
@@ -475,12 +482,13 @@ jobs:
475482
path: dist/
476483
merge-multiple: true
477484

478-
- name: List packages
485+
- name: Remove source distribution from PyPI payload
479486
run: |
480-
echo "=== Packages to upload ==="
487+
rm -f dist/*.tar.gz
488+
echo "=== Wheels to upload to PyPI ==="
481489
ls -la dist/
482490
if [ -z "$(ls -A dist/)" ]; then
483-
echo "ERROR: No Python packages found!"
491+
echo "ERROR: No wheel packages found!"
484492
exit 1
485493
fi
486494

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ services:
248248

249249
**Operating Systems:**
250250
- ✅ Linux (Ubuntu 20.04+, RHEL 8+)
251-
- ✅ macOS (10.15+, both Intel and Apple Silicon)
251+
- ✅ macOS (10.15+, Apple Silicon arm64 packaged path)
252+
- ✅ macOS Intel (10.15+, x86_64 packaged wheel path)
253+
- ⚠️ Apple Silicon users should still prefer a native arm64 Python env over Rosetta
252254
- ⚠️ Windows (requires native builds)
253255

254256
**File Descriptors:**
@@ -286,7 +288,7 @@ db = Database.open_concurrent("./data.db")
286288
OSError: libsochdb_storage.dylib not found
287289
```
288290

289-
**macOS**:
291+
**macOS (if you are not on the supported packaged arm64 path)**:
290292
```bash
291293
# Build and install library
292294
cd /path/to/sochdb
@@ -460,7 +462,9 @@ pip install sochdb
460462
| Platform | Architecture | Status |
461463
|----------|--------------|--------|
462464
| Linux | x86_64, aarch64 | ✅ Full support |
463-
| macOS | x86_64, arm64 | ✅ Full support |
465+
| macOS | arm64 | ✅ Packaged wheel support |
466+
| macOS Intel | x86_64 | ✅ Packaged wheel support |
467+
| Apple Silicon via Rosetta | x86_64 | ⚠️ Prefer native arm64 Python first |
464468
| Windows | x86_64 | ✅ Full support |
465469

466470
**Optional Dependencies:**

RELEASE.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ Each platform-specific wheel contains:
2626
The workflow builds wheels for:
2727
- **Linux x86_64** (`manylinux_2_17_x86_64`)
2828
- **macOS ARM64** (`macosx_11_0_arm64`) - Apple Silicon
29+
- **macOS x86_64** (`macosx_10_15_x86_64`) - Intel
2930
- **Windows x64** (`win_amd64`)
3031

32+
Unsupported platforms should not fall back to a PyPI source distribution, because that can produce a misleading install with the wrong bundled native binaries.
33+
3134
### 4. Python Version Support
3235
Wheels are compatible with:
3336
- Python 3.9
@@ -43,6 +46,7 @@ Wheels are compatible with:
4346
2. The release must have platform-specific archives:
4447
- `sochdb-{version}-x86_64-unknown-linux-gnu.tar.gz`
4548
- `sochdb-{version}-aarch64-apple-darwin.tar.gz`
49+
- `sochdb-{version}-x86_64-apple-darwin.tar.gz`
4650
- `sochdb-{version}-x86_64-pc-windows-msvc.zip`
4751

4852
### Running a Release
@@ -72,7 +76,8 @@ Wheels are compatible with:
7276
- Generates release notes with installation instructions
7377

7478
4. **Publish to PyPI**:
75-
- Uploads all wheels and source distribution
79+
- Uploads wheels only
80+
- Keeps the source distribution off PyPI so unsupported platforms do not fall back to a broken binary mix
7681
- Uses OIDC Trusted Publisher (no token needed)
7782

7883
5. **Summary**:
@@ -155,7 +160,7 @@ sochdb-server --help
155160
- [ ] Review workflow artifacts and logs
156161
- [ ] Run workflow with `dry_run: false` for production
157162
- [ ] Verify GitHub release is created
158-
- [ ] Verify packages appear on PyPI
163+
- [ ] Verify only wheel packages appear on PyPI (no sdist upload)
159164
- [ ] Test installation: `pip install sochdb-client==X.Y.Z`
160165
- [ ] Update CHANGELOG.md with release notes
161166

0 commit comments

Comments
 (0)