You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Summary
This pull request introduces significant updates to the build pipeline
and codebase to support universal2 binaries for macOS and improve
artifact organization. The changes include adding a new macOS build job,
updating architecture handling for macOS to prioritize universal2
binaries, and refining artifact naming and placement for better clarity.
### Build Pipeline Updates:
* Added a new `BuildMacOSWheels` job in
`eng/pipelines/build-whl-pipeline.yml` to build universal2 binaries for
macOS. This includes steps for setting up Python, installing
dependencies, building `.so` files, and publishing artifacts.
* Updated artifact paths and names in the build pipeline to reflect the
new structure, such as renaming `all-pyds` to `ddbc-bindings` and
updating artifact names to `mssql-python-ddbc-bindings`.
[[1]](diffhunk://#diff-a871d64acfb78366b4b077045db53551c2df7d622854569f5f6780ad2ec6f911L126-R125)
[[2]](diffhunk://#diff-a871d64acfb78366b4b077045db53551c2df7d622854569f5f6780ad2ec6f911L157-R164)
### macOS Universal2 Support:
* Modified `CMakeLists.txt` to always use universal2 architecture for
macOS, ensuring compatibility with both `arm64` and `x86_64`. Added a
new CMake setting to enforce universal builds.
[[1]](diffhunk://#diff-dbb5892fbbb28149d1639664797cf3adb48ced28ec11aba95f2e2b338ca46badL31-R32)
[[2]](diffhunk://#diff-dbb5892fbbb28149d1639664797cf3adb48ced28ec11aba95f2e2b338ca46badR43-R48)
[[3]](diffhunk://#diff-dbb5892fbbb28149d1639664797cf3adb48ced28ec11aba95f2e2b338ca46badL72-R70)
* Updated `build.sh` to simplify the build process for macOS by removing
architecture-specific logic and focusing on universal2 binaries. Added
diagnostics to verify the universal binary output.
[[1]](diffhunk://#diff-7cfcd9b5499a176c28ca4d028e9b2b060238ec79c4bea5b062d4b39929f9fb04L2-R31)
[[2]](diffhunk://#diff-7cfcd9b5499a176c28ca4d028e9b2b060238ec79c4bea5b062d4b39929f9fb04L87-R85)
### Codebase Adjustments for Universal2:
* Updated `ddbc_bindings.py` to prioritize universal2 binaries on macOS,
regardless of local architecture. Added error handling for unsupported
platforms.
* Adjusted `setup.py` to always use the `macosx_15_0_universal2`
platform tag for macOS wheels, ensuring consistent naming and
compatibility.
[[1]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L41-R44)
[[2]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L75-R78)
### Documentation and Examples:
* Updated the `README.md` in `mssql_python/pybind` to reflect the new
universal2 binary naming convention (e.g., `.so` files named with
`universal2`).
These changes streamline the build process, enhance cross-platform
compatibility, and improve artifact organization, aligning the project
with modern macOS development practices.
### Issue Reference
Fixes
[AB#37761](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/37761)
0 commit comments