Skip to content

Conversation

@gsmecher
Copy link
Contributor

@gsmecher gsmecher commented Feb 6, 2026

This release adds support for building Python wheels via CMake and scikit-build-core, enabling cross-platform builds for Windows, Linux, and macOS. Python bindings now require Python 3.9+ and support NumPy 2.x.

Build system improvements:

  • CMake modernization for Python wheel generation and improved cross-platform compatibility
  • Added CI/CD workflows for automated testing on Ubuntu, macOS, and Windows platforms via GitHub Actions
  • Improved MSVC (Visual C++) compatibility for native Windows builds

Python bindings:

  • Updated to support NumPy 2.x
  • Fixed encoding_support return codes
  • Improved Python 3.x compatibility in test suite (exception handling, path separators, regex handling for builds without PCRE support)

Compatibility fixes:

  • Fixed 64-bit time_t compatibility on 32-bit architectures
  • Fixed Python version detection for Python 3.10+
  • Updated Fortran support for modern gfortran (>= 10) with -std=legacy and -fallow-argument-mismatch flags
  • Fixed MacOS .dylib generation and post-install path demangling
  • Bumped minimum automake version to 1.16

@gsmecher
Copy link
Contributor Author

gsmecher commented Feb 6, 2026

This PR stacks on the previous one (#21), and I am expecting them to be merged in sequence and possibly squashed along the way. Please comment here on "release ceremony" (version number, ChangeLog/README updates, et cetera). When/if #21 gets merged, squashed, or rebased, I will graft this PR onto whatever results.

@arahlin arahlin requested review from arahlin and ketiltrout February 6, 2026 21:35
@gsmecher gsmecher force-pushed the python-cmake-release branch 2 times, most recently from e232ca7 to e497c9d Compare February 6, 2026 22:10
Copy link
Collaborator

@arahlin arahlin left a comment

Choose a reason for hiding this comment

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

This looks complete to my eye. Will give @ketiltrout a bit of time to comment in case there's anything to add here.

@gsmecher
Copy link
Contributor Author

gsmecher commented Feb 7, 2026

Turns out that Windows lacked some plugin support due to the CI/CD environment. I am preparing another PR to bring Windows up to a minimum baseline (including a Python test script to check automatically), and will rebase this PR on top of it once it's complete.

This appears to be a gcc extension that msvc does not allow. Because we
didn't build the lzma code on Windows before this, it didn't matter.
@gsmecher gsmecher force-pushed the python-cmake-release branch from e497c9d to 240f141 Compare February 7, 2026 19:33
@gsmecher
Copy link
Contributor Author

gsmecher commented Feb 7, 2026

I have added the necessary commits to this PR (before the RELEASE commit). Once the build completes without errors, I think we're clear to merge.

@gsmecher gsmecher force-pushed the python-cmake-release branch from 240f141 to fee6aee Compare February 7, 2026 20:14
These tests were accidentally bypassed due to a macro typo.
@gsmecher gsmecher force-pushed the python-cmake-release branch from fee6aee to 24c08c9 Compare February 7, 2026 22:25
@gsmecher
Copy link
Contributor Author

gsmecher commented Feb 7, 2026

Along the way, I found a couple of goofs:

  • CMake never invoked the BZIP2 tests on any platform, due to a macro naming inconsistency
  • Windows encoding tests failed with UNIX-isms (/dev/null)

These are now fixed. As above - when the CI/CD tests run to completion (this time for sure!) we are OK to merge.

@gsmecher gsmecher force-pushed the python-cmake-release branch from 24c08c9 to d2fd3ff Compare February 8, 2026 00:41
Notably, Windows does not always have gunzip, and the conditional logic
associated with running tests did not correctly handle environments with
gzip but not gunzip. I've modified bunzip2/bzip2 for consistency.
This release adds support for building Python wheels via CMake and
scikit-build-core, enabling cross-platform builds for Windows, Linux,
and macOS. Python bindings now require Python 3.9+ and support NumPy 2.x.

Build system improvements:
- CMake modernization for Python wheel generation and improved
  cross-platform compatibility
- Added CI/CD workflows for automated testing on Ubuntu, macOS, and
  Windows platforms via GitHub Actions
- Improved MSVC (Visual C++) compatibility for native Windows builds

Python bindings:
- Updated to support NumPy 2.x
- Fixed encoding_support return codes
- Improved Python 3.x compatibility in test suite (exception handling,
  path separators, regex handling for builds without PCRE support)

Compatibility fixes:
- Fixed 64-bit time_t compatibility on 32-bit architectures
- Fixed Python version detection for Python 3.10+
- Updated Fortran support for modern gfortran (>= 10) with -std=legacy
  and -fallow-argument-mismatch flags
- Fixed MacOS .dylib generation and post-install path demangling
- Bumped minimum automake version to 1.16
@gsmecher gsmecher force-pushed the python-cmake-release branch from d2fd3ff to ac0c961 Compare February 8, 2026 02:21
@gsmecher
Copy link
Contributor Author

gsmecher commented Feb 8, 2026

And, finally, two more Windows fixes

  • Tests now use "bzip2 -d" and "gzip -d" rather than "bunzip" or "gunzip" - the unzip variants are apparently not included on Windows.
  • Executables (like gzip or bzip2) need to be quoted before calling gd_system() - there may be spaces in paths ("Program Files")

I am pleased to see all tests pass now. @arahlin, @ketiltrout, my apologies for the avalanche of GitHub e-mails you've been receiving.

If you want the complete summary, it's all captured in my comments on the PR. The current commit stack is logical (and you can either merge it as-is, or squash, as you prefer).

Please merge at your leisure (or let me know if you would like to see any more changes.)

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.

2 participants