cmake: modernize CMake infrastructure; adds modules, bindings; build Windows wheels#21
Merged
arahlin merged 29 commits intoketiltrout:masterfrom Feb 6, 2026
Merged
Conversation
Contributor
Author
|
@ketiltrout and @arahlin, sorry to drop this on you before the holidays. This is a follow-up to #20 (and includes both series of commits). |
667f835 to
ccccf8e
Compare
… iterating Without this poison, the following tests segfault: 1426 - test_trunc (SEGFAULT) 1427 - test_trunc_dir (SEGFAULT) 1429 - test_trunc_truncsub (SEGFAULT)
…arch() This has no impact on the current codebase, but in a future commit we'll be adding Windows support (which means backslashes, which need to be escaped.)
ccccf8e to
1da0110
Compare
arahlin
reviewed
Dec 18, 2025
arahlin
reviewed
Dec 18, 2025
5f66b02 to
f7099e1
Compare
…n warnings Since cmake on Windows unconditionally defines GD_C89_API, Windows otherwise gives us warnings like: \path\to\alter_crecip89.c(22,9): warning C4005: 'GD_C89_API': macro redefinition
This works within GCC but not within MSVC, and the c++ preprocessor documentation (see 16.3.4 in N4594) seems to disavow this behaviour.
Now that CMake generates gd_config.h (consistent with the automake flow), this macro was redundant and can be safely removed.
Squashes the warning: Warning: cibuildwheel: Invalid skip selector: 'cp36*'. cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `skip`. This selector will have no effect. Warning: cibuildwheel: Invalid skip selector: 'cp37*'. cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `skip`. This selector will have no effect.
This is a little clunky but reduces the number of redundant places where the version numbering must be updated.
The DocStrings for the Python bindings report: encoding_support(encoding) The 'encoding' parameter should be one of the pygetdata.*_ENCODED symbols. This method will return pygetdata.RDWR if the library can read and write the encoding, pygetdata.RDONLY if the library can only read the encoding, or None otherwise. See gd_encoding_support(3). However, the code returned None on GD_RDONLY==0 and the integer value of the gd_encoding_support return code otherwise (typically GD_RDWR, GD_E_UNKNOWN_ENCODING, or GD_E_UNSUPPORTED).
fc4334e to
bfe73d2
Compare
The static link, in particular, is intended to sidestep upstream issues that still seem unsettled: pypa/auditwheel#340 aestream/aestream#112
bfe73d2 to
7e62344
Compare
arahlin
reviewed
Feb 6, 2026
arahlin
reviewed
Feb 6, 2026
arahlin
approved these changes
Feb 6, 2026
Collaborator
arahlin
left a comment
There was a problem hiding this comment.
Looks great, I'm happy with how this is integrated while leaving the autotools build intact. Thanks for all the hard work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on the previous one (#20), so while it's a big change, it's not as sprawling as it seems.
My primary motivation is getting Windows wheels built for pygetdata. This created a fair cascade of tasks because:
Practically speaking, native Windows support needs CMake instead of autotools, and switching the MacOS/Linux wheel builders at the same time makes sense. The autotools flow remains in place (and the github regression tests still pass against it.)
This PR contains a mix of "omnibus commits" (an incremental modernization of the CMake infrastructure does not make sense) and "drive-by commits" for individual bug fixes or improvements.
Note that we have definitely left Python 2.x behind (Numpy 2.x never supported it anyways).