Skip to content

CI: Fix Meson mixup between Conda and system Python headers#839

Merged
d-v-b merged 3 commits into
zarr-developers:mainfrom
DimitriPapadopoulos:fix-cython
May 14, 2026
Merged

CI: Fix Meson mixup between Conda and system Python headers#839
d-v-b merged 3 commits into
zarr-developers:mainfrom
DimitriPapadopoulos:fix-cython

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Apr 18, 2026

Fix CI failure. Convince Meson to pick Python headers installed by Conda, not system-wide headers.

This really feels like a hack. I don't know enough about meson to understand and fix this mess cleanly. There has to be a way though, Meson cannot be that broken. Any clues?

Edit: A better strategy is probably to remove Conda altogether, used primarily to install C/C++ compilers, as C/C++ compilers are readily available in GitHub runners.

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

@DimitriPapadopoulos DimitriPapadopoulos changed the title Install Python headers alongside compiler Install Python headers Apr 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1fdde70) to head (4ac5288).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #839   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines          901       901           
=========================================
  Hits           901       901           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the fix-cython branch 4 times, most recently from 2260335 to 64ebfea Compare April 18, 2026 15:25
@DimitriPapadopoulos DimitriPapadopoulos changed the title Install Python headers Use Conda Python headers Apr 18, 2026
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the fix-cython branch 18 times, most recently from 995f2ab to bc238da Compare April 21, 2026 19:32
Otherwise, Meson insists on getting Cython to include system Python
headers which simply doesn't work:

	-----
	Sanity check compile stderr:
	In file included from /usr/include/python3.10/Python.h:8,
	                 from sanity_check_for_cython.c:19:
	/usr/include/python3.10/pyconfig.h:9:12: fatal error: aarch64-linux-gnu/python3.10/pyconfig.h: No such file or directory
	    9 | #  include <aarch64-linux-gnu/python3.10/pyconfig.h>
	      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	compilation terminated.

	-----

Also, avoid starting a new shell!
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review April 21, 2026 19:34
@DimitriPapadopoulos DimitriPapadopoulos changed the title Use Conda Python headers Fix CI: Use Conda Python headers Apr 21, 2026
@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

DimitriPapadopoulos commented May 14, 2026

Perhaps it's time to drop Conda... C/C++ compilers are readily available in GitHub runners. Why reinstall C/C++ compilers with Conda?

Conda was used to get GCC or Clang for compiling the C extensions.
GitHub Actions runners come with C/C++ compilers pre-installed.
@DimitriPapadopoulos DimitriPapadopoulos changed the title Fix CI: Use Conda Python headers Fix CI: Avoid mixup between Conda and system Python headers May 14, 2026
@DimitriPapadopoulos DimitriPapadopoulos changed the title Fix CI: Avoid mixup between Conda and system Python headers CI: Fix Meson mixup between Conda and system Python headers May 14, 2026
@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

@d-v-b Could you have a look at the latest change, which solves the mixup between Conda and system-wide Python headers by removing Conda altogether?

@d-v-b
Copy link
Copy Markdown
Contributor

d-v-b commented May 14, 2026

lgtm

@d-v-b d-v-b merged commit fa92ee7 into zarr-developers:main May 14, 2026
38 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the fix-cython branch May 14, 2026 07:48
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