Commit ff48f6a
committed
Fix macOS/Windows CI failures: static linking and architecture settings
This commit addresses persistent CI test failures on macOS and Windows:
1. Force static linking of dependencies:
- Added -DBUILD_SHARED_LIBS=OFF to avoid delocate-wheel failures
- Prevents snappy from being built as shared dylib with wrong arch
- Eliminates need for delocate to vendor dylibs on macOS
2. Set proper architecture targeting for macOS:
- Parse ARCHFLAGS environment variable (set by cibuildwheel)
- Set CMAKE_OSX_ARCHITECTURES to target correct arch (arm64/x86_64)
- Fixes delocate-wheel --require-archs failures
3. Set macOS deployment target:
- Use MACOSX_DEPLOYMENT_TARGET from environment
- Ensures proper SDK and API compatibility
4. Add CMAKE_RUNTIME_OUTPUT_DIRECTORY for macOS:
- Handles multi-config generators (Xcode) properly
- Ensures module is placed in correct output directory
These changes address the root causes of:
- delocate-wheel failures on macOS (wrong arch, missing dylibs)
- pytest exit code 2 failures (module not found in installed wheels)
- Multi-config generator output directory issues
All 123 tests pass locally on Linux with static linking enabled.
Related to PR #451 parent 51c36e4 commit ff48f6a
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
0 commit comments