Skip to content

xtgeo: Add version 4.25.1 - #3004

Draft
luhenry wants to merge 3 commits into
mainfrom
xtgeo
Draft

luhenry wants to merge 3 commits into
mainfrom
xtgeo

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles xtgeo's pybind11 and SWIG C/C++ extensions (3D grid, surface, cube and well geometry routines; fmt and Eigen fetched at build time). Upstream publishes no riscv64 wheel.

Mirrors upstream's publish.yml.

Differs from upstream

  • swig<4.3.0 unpinned to swig - that range has no riscv64 PyPI wheel
  • numpy.i patched for SWIG's 4.3+ 3-arg SWIG_Python_AppendOutput - project's vendored copy predates it

Matrix: cp312/cp313/cp314, no cp314t (matches upstream); cp311 dropped since numpy>=2.5 floors at 3.12 and our registry only hosts that line.

Testing

  • same as upstream

License: fmt (MIT) and Eigen (MPL-2.0) are fetched via CMake FetchContent and statically linked; neither is GPL, so no extra action needed.

Patches

  • 0001-unpin-swig-for-riscv64.patch - Inappropriate. Drops the <4.3.0 pin; its own Python 3.8 rationale no longer applies here. Reproduces on x86_64.
  • 0002-fix-numpy-i-for-swig-4.3-appendoutput-signature.patch - Inappropriate. Fixes a real build break with any riscv64-wheel-having SWIG. Reproduces on x86_64.

Built on cp311 locally (floor interpreter available here); wheel imports and a RegularSurface smoke-checks clean.

@luhenry
luhenry marked this pull request as draft October 13, 2026 09:25
Upstream tags releases without a "v" prefix, so check out
${XTGEO_VERSION} rather than v${XTGEO_VERSION}; every build job failed
at checkout with "A branch or tag with the name 'v4.25.1' could not be
found".

Override the inherited [tool.cibuildwheel.linux] before-all: fmt-devel
is EPEL-only and the riscv64 manylinux image has no EPEL, so
"yum install -y eigen3-devel fmt-devel" exits non-zero there. Install
eigen3-devel (CRB) only; CMake already falls back to FetchContent for
fmt.

Pin SETUPTOOLS_SCM_PRETEND_VERSION_FOR_XTGEO: applying the patches
leaves the tree dirty and setuptools_scm otherwise versions the wheel
4.25.2.dev0. The full-history fetch is no longer needed.

Patch 0002 now calls SWIG_AppendOutput() so void functions keep
SWIG's $isvoid behaviour; the hardcoded is_void=0 made them return
[None, ...]. New patch 0003 replaces the PyString_Check, PyInt_Check
and PyInt_AsLong macros that SWIG 4.5 removed, which left
_cxtgeo with an undefined PyInt_AsLong symbol.
matplotlib (a direct xtgeo runtime dependency) pulls in pillow, whose
newest PyPI release has no riscv64 wheel. pip fell back to building
pillow's sdist, which fails with "RequiredDependencyException: jpeg"
since the manylinux_2_39_riscv64 image carries no libjpeg headers
(gotcha 291). Our own registry already hosts riscv64 pillow wheels
for cp312/cp313/cp314 (verified via ci_scripts/check_riscv64_deps.py),
so listing pillow in PIP_ONLY_BINARY makes pip prefer those instead.

This branch has not been deployed

No deployments
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