Skip to content

Conversation

@jameskermode
Copy link
Member

Summary

  • Fixes pip install quippy-ase does not make quip and gap_fit any more? #703: quip and gap_fit executables missing from the quippy-ase PyPI wheel after meson migration
  • Bundle CLI executables (quip, gap_fit, md) in the wheel package
  • Register entry points via [project.scripts] in pyproject.toml
  • Add CI tests to verify executables are bundled and functional

Changes

  1. quippy/pyproject.toml: Add [project.scripts] section with entry points for quip, gap_fit, md, and quip-config

  2. quippy/install_executables.py (new): Install script that copies executables from the QUIP build directory to the quippy package directory during meson install

  3. quippy/meson.build: Add meson.add_install_script() to run the install script

  4. quippy/quippy/cli.py: Improve error handling with _run_command() helper that provides helpful error messages when executables are missing

  5. .github/workflows/build-wheels.yml: Add CIBW_TEST_COMMAND to verify:

    • quippy imports correctly
    • All executable files exist in the package
    • quip --help, gap_fit --help, and md --help run successfully

Test plan

  • Local build test: meson setup builddir && meson compile -C builddir && meson install -C builddir --destdir=test_install
  • Verified executables are copied to quippy/ package directory with correct permissions
  • CI wheel build should pass with new CIBW_TEST_COMMAND verification

🤖 Generated with Claude Code

@jameskermode jameskermode force-pushed the fix-cli-executables-wheel branch from a06c957 to 5e42192 Compare January 20, 2026 13:57
Bundle quip, gap_fit, and md executables in the wheel by:

- Add [project.scripts] entry points to pyproject.toml for CLI commands
- Create install_executables.py to copy executables during meson install
- Update meson.build to run install script via meson.add_install_script()
- Improve cli.py error handling with helpful messages when executables missing
- Add CIBW_TEST_COMMAND to verify executables are bundled and functional

The executables are copied to the quippy package directory during install,
and delocate/auditwheel will bundle the required shared libraries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jameskermode jameskermode force-pushed the fix-cli-executables-wheel branch from 5e42192 to 6dfab04 Compare January 20, 2026 14:10
jameskermode and others added 5 commits January 20, 2026 15:25
The meson.add_install_script() approach wasn't working with meson-python
wheel builds. Switch to using custom_target with install: true to copy
executables during the build phase, which properly integrates with
meson-python's wheel building process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The gap_fit executable links against libgap_fit.so which is in the
Programs build directory. Add this path to LD_LIBRARY_PATH (Linux)
and QUIP_LIB_PATH (macOS) so auditwheel/delocate can find and bundle it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
QUIP executables may exit non-zero even on --help, so use || true
to still run them (verifying they're functional) without failing
on non-zero exit status.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use fs.copyfile() instead of find_program() + custom_target
  This is simpler and avoids potential issues with find_program()

- Remove executable --help tests that hang on Linux
  The md --help command hangs waiting for input on Linux,
  causing 6-hour CI timeout. Just verify files exist instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
scipy 1.17+ only provides wheels for manylinux_2_27+, so on our
manylinux2014 container it builds from source. This requires:
1. A Fortran compiler (gcc-gfortran)
2. OpenBLAS development files that scipy can find

Install scipy-openblas32 via CIBW_TEST_REQUIRES_LINUX, which provides
the pkg-config files scipy needs to find OpenBLAS during its build.
Also install gcc-gfortran via CIBW_BEFORE_TEST_LINUX.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jameskermode jameskermode force-pushed the fix-cli-executables-wheel branch from 623d4ef to d461658 Compare January 21, 2026 08:11
jameskermode and others added 6 commits January 21, 2026 11:15
scipy only provides manylinux_2_27+ wheels for Python 3.13+, but we use
manylinux2014 for broader Linux compatibility. For Python 3.9-3.12,
scipy has manylinux2014 wheels available.

macOS wheels continue to support Python 3.13+ since scipy has compatible
wheels for those platforms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add BUILDDIR environment variable to build.yml so tests find executables
in the main build directory instead of the quippy package. Also add wheel
verification step to help debug executable bundling issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
scipy doesn't provide manylinux2014 wheels anymore, so pip builds
it from source when installing test dependencies. This requires
OpenBLAS development headers to be available in the test container.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
scipy 1.17+ only provides manylinux_2_27 wheels (not manylinux2014),
which are incompatible with our manylinux2014-based builds. Instead of
trying to build scipy from source (which fails due to OpenBLAS pkg-config
issues), we skip Python 3.11+ on Linux. macOS wheels for all Python
versions are still built.

Linux users on Python 3.11+ can still install from source with pip.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use a matrix with two Linux configurations:
- manylinux2014 for Python 3.9-3.10 (broader OS compatibility)
- manylinux_2_28 for Python 3.11+ (scipy wheel compatibility)

This provides Linux wheels for all Python versions while maintaining
compatibility with older distributions for 3.9-3.10.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
netcdf-devel and hdf5-devel are not available in AlmaLinux 8 base repos.
Since they're optional dependencies, remove them for manylinux_2_28.
Only openblas-devel and lapack-devel are required for the core build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jameskermode jameskermode merged commit 328a171 into public Jan 21, 2026
15 checks passed
@jameskermode jameskermode deleted the fix-cli-executables-wheel branch January 21, 2026 16:46
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.

pip install quippy-ase does not make quip and gap_fit any more?

2 participants