Skip to content

Fix wheel builds#54

Merged
peytondmurray merged 29 commits intoQuansight:mainfrom
peytondmurray:fix-non-ubuntu-builds
Dec 22, 2025
Merged

Fix wheel builds#54
peytondmurray merged 29 commits intoQuansight:mainfrom
peytondmurray:fix-non-ubuntu-builds

Conversation

@peytondmurray
Copy link
Collaborator

@peytondmurray peytondmurray commented Dec 20, 2025

Closes #53 by

  • Installing sqlite for the sdist
  • Installing the correct icu dependency on linux, and on macos
  • Disabling macos x86 builds (GH doesn't have these runners available anymore)
  • Forcing the C++ standard to c++17
  • Building on windows-latest
  • Reordering includes so that any SQL headers come after pyodbc.h, since that header includes windows.h, which is needed for types used by the SQL headers on Windows (why don't they just include it themselves?)
  • Using the output of np.get_include() directly instead of passing it to os.path.relpath, which fails if for some reason numpy is installed on a separate drive (with no common relative path), as it is on Windows github runners
  • Setting the compile flags on a per-platform basis
  • Adding steps for installing msvc, as well as pkg-config and icu (via vcpkg) on windows
  • Disabling win32 builds
  • Explicitly setting the PKG_CONFIG and PKG_CONFIG_PATH env variables on windows; otherwise meson uses the wrong pkg-config, and looks in the wrong location

I've also removed the textenc.h patch, we are not using it after having fixed some includes in #52.

@peytondmurray peytondmurray marked this pull request as ready for review December 20, 2025 06:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Windows and macOS wheel builds by addressing multiple build system and dependency issues. The changes enable successful wheel compilation across different platforms by properly configuring compilers, dependencies, and include paths.

Key changes:

  • Platform-specific build configurations with proper ODBC library detection and compiler flags for Windows/Unix systems
  • Reordered C++ includes to ensure SQL headers come after pyodbc.h for Windows compatibility
  • Fixed numpy include path handling to avoid cross-drive path resolution issues on Windows

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
.github/workflows/artifacts_build.yml Adds dependency installations (sqlite, icu, meson), configures Windows builds with vcpkg, removes macOS x86 builds, and sets platform-specific environment variables
meson.build Implements platform-specific compiler flags and ODBC detection logic, fixes numpy include path handling, and adds C++17 standard requirement
subprojects/packagefiles/pyodbc/meson.build Mirrors platform-specific build configuration from main meson.build with Windows and Unix-specific compiler flags and ODBC detection
src/npyodbcmodule.cpp Reorders includes to place SQL headers after pyodbc.h for Windows compatibility
src/npcontainer.cpp Moves sqltypes.h include after other project headers for consistent include ordering
subprojects/pyodbc.wrap Removes reference to textenc.patch which is no longer needed
subprojects/packagefiles/patches/textenc.patch Deletes the patch file that is no longer used after include fixes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peytondmurray peytondmurray changed the title Fix windows and macos wheel builds Fix wheel builds Dec 20, 2025
@peytondmurray peytondmurray merged commit f37c657 into Quansight:main Dec 22, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS and Windows build failures

2 participants