Skip to content

Fix python interface for new python version and new numpy versions#70

Merged
mgravey merged 35 commits intomasterfrom
fix-python-interface
Nov 1, 2025
Merged

Fix python interface for new python version and new numpy versions#70
mgravey merged 35 commits intomasterfrom
fix-python-interface

Conversation

@mgravey
Copy link
Member

@mgravey mgravey commented Nov 1, 2025

No description provided.

checked on mac and linux
Update GitHub Actions workflows to use 'make python-wheel' in the build directory instead of running 'python -m build' in 'build/python-build'. This standardizes the build process and leverages the Makefile for wheel creation.
Refactors the pythonPublishTest GitHub Actions workflow to separate build jobs for Linux (manylinux), macOS, and Windows. Each job now builds and tests wheels for multiple Python versions and uploads them to TestPyPI. The Linux build uses a manylinux container for compatibility, and redundant logic is removed for clarity and maintainability.
Standardized pip invocation to use 'python -m pip' in some steps and added 'twine' to the dependencies list for build and publish jobs. This improves compatibility and ensures all required tools are available during the workflow.
Updated DataImage.cpp to include zlib headers and functionality only on Linux and macOS platforms. Modified setup.py to link against zlib only on these platforms, preventing unnecessary linkage on others. Adjusted the GitHub workflow to use the correct Python binary for manylinux builds.
Updated Makefile to use python3 or fallback to python for building, improving compatibility across environments. Modified DataImage.cpp to conditionally include platform-specific headers for Windows and Unix-like systems, enhancing cross-platform support.
Refactor the GitHub Actions workflow to use a configurable Python binary and add more robust build steps, including twine installation and output listing. Update the Makefile to allow overriding the Python interpreter via the PYTHON variable, improving compatibility. Add '/D_CRT_SECURE_NO_WARNINGS' to Windows build flags in setup.py to suppress CRT warnings.
Replaced platform-specific checks for Linux and macOS with a unified _WIN32 check in DataImage.cpp to simplify cross-platform compatibility. Also updated the GitHub Actions workflow to change the build directory path for Python wheel creation.
The GitHub Actions workflow now upgrades twine before uploading to Test PyPI to ensure the latest version is used. In setup.py, added '/D_USE_MATH_DEFINES' and duplicated '/D_CRT_SECURE_NO_WARNINGS' to the Windows compiler flags to enable math defines and optionally silence CRT warnings.
Enhances the GitHub Actions workflow to install auditwheel, run auditwheel repair, and provide clearer build output. Also fixes the use of string delimiters in setup.py for Windows-specific compiler flags.
Removes linux_x86_64 wheels after auditwheel repair in the GitHub Actions workflow. Adds '/ZMQ_NO_PRAGMA_LIB' to Windows compile flags in setup.py to control ZeroMQ library linkage.
Updated the GitHub Actions workflow and setup scripts to build and include libzmq for Windows. The setup.py now detects and packages libzmq DLLs, and the Windows batch script builds libzmq using CMake and MSBuild. This ensures the Python wheel includes required native dependencies on Windows.
Eliminated the conditional check for Windows in the GitHub Actions workflow and removed '@echo off' from the Windows setup batch script. This simplifies the build process and ensures the Windows dependencies step always runs.
Update MANIFEST.in to include ZeroMQ DLLs and libs from build output directories. Enhance setup.py to detect and bundle the correct ZeroMQ .lib and .dll files for Windows, ensuring they are copied into the wheel for distribution. Adds improved logging and error handling for missing build artifacts.
Replaces emoji in print statements with plain text in the build_ext class to standardize log output and improve readability in build logs.
Introduced a step to set up MSBuild using the microsoft/setup-msbuild action in the pythonPublishTest GitHub Actions workflow. This ensures MSBuild is available for subsequent build steps, improving Windows build compatibility.
Introduces a new 'build-sdist' job to the GitHub Actions workflow for building and uploading Python source distributions to TestPyPI. This job sets up Python 3.12, installs required tools, builds the sdist, and uploads it using Twine.
Split the Python publishing workflow into separate jobs for source distribution, Linux (manylinux), macOS, and Windows wheels. Each job now handles its own build, test, and upload steps, improving clarity and maintainability of the CI process.
Added a loop to erase entries from the inputs map where the value is a PyObject* set to Py_None. This ensures that inputs containing None values are not processed further.
@mgravey mgravey merged commit cd29b10 into master Nov 1, 2025
16 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.

1 participant