Building windows python wheels with fortran support#585
Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/windows_build/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #585 +/- ##
=======================================
Coverage 78.24% 78.24%
=======================================
Files 54 54
Lines 6857 6857
=======================================
Hits 5365 5365
Misses 1492 1492 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
510df30 to
80fd4f0
Compare
80fd4f0 to
4cba2fc
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR enables building Windows Python wheels with Fortran support by configuring MSYS2 with MinGW64 toolchain. The changes allow the CI/CD pipeline to build, repair, and test wheels across all supported platforms (Linux, macOS, Windows) more consistently with what users will receive from PyPI.
Key changes:
- Added MSYS2/MinGW64 setup for Windows CI to provide gfortran compiler
- Implemented wheel building and testing workflow that mirrors user installation experience
- Removed platform-specific restrictions that disabled TUVX and CARMA on Windows
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| python/musica/tools/repair_wheel_windows.sh | New script to repair Windows wheels using delvewheel |
| python/musica/tools/prepare_build_environment_windows.bat | Contains unresolved merge conflict markers |
| python/musica/test/integration/test_sulfate_box_model.py | Removed emoji from test output message |
| pyproject.toml | Enabled Windows builds, added wheel repair configuration, updated dependencies formatting |
| include/musica/carma/error.hpp | Removed duplicate #pragma once directive |
| CMakeLists.txt | Disabled CMake module scanning on macOS |
| .github/workflows/windows.yml | Migrated MinGW setup to composite action |
| .github/workflows/python-wheels.yml | Updated to build Windows wheels using MSYS2 environment |
| .github/workflows/python-tests.yml | Refactored to build and test wheels instead of direct installation |
| .github/windows_arm64_steps/action.yml | New composite action for ARM64 Windows setup (currently unused) |
| .github/windows_amd64_steps/action.yml | New composite action for AMD64 Windows setup with MSYS2 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Closes #590
Attempts
Other information
At first I tried to use rtools, like in scipy, so I heavily relied on what scipy does to support fortran on windows.