Build PyPI wheels in CI - #3312
yorickreum wants to merge 2 commits into
Conversation
d7f3dd1 to
30063ba
Compare
oskooi
left a comment
There was a problem hiding this comment.
LGTM.
Thanks for putting together this (long-awaited) package.
|
In order for this to work, do we need to register a |
|
cc @haard, who maintains a @haard, if your |
|
I'd be happy to, |
Cool! |
config.status generates meep/meep-config.h into $(top_builddir)/src. src/ compiles because automake's default -I. already points there, but python/ and libpympb/ only had -I$(top_srcdir)/src, so building the Python interface out of tree from a Git checkout cannot find the header.
30063ba to
749af85
Compare
Add PEP 517 packaging and cibuildwheel CI to build and test Meep wheels for Linux and Apple silicon. The wheels ship the MPI build. Addresses NanoComp#2699.
749af85 to
fa9eed3
Compare
Build and publish PyPI wheels
Addresses #2699 by building wheels for Python 3.10 through 3.13 for Linux (manylinux, arm64 and x64) and macOS (Apple Silicon / arm64).
This makes installing
meepviapip install(without Conda) straightforward. The wheels package both the serial and MPI binaries (adding around 2 MB per wheel to ship both), so only one package needs to be published, and users can decide during import which version they want to use.Naming
The distribution is
pymeep, matching the Conda package; the import name staysmeep.meepon PyPI is an unrelated task runner, last released in 2018. It is abandoned, so the name could be requested under PEP 541, but that is a conversation with PyPI that the Meep maintainers would need to have.Verified
All platforms above build, repair, and install into a clean environment and run a smoke test that exercises FDTD, an MPB eigensolve, and a real 2-rank MPI job, asserting that both ranks share one communicator and produce the serial result.
Meep's own
test_ring,test_mode_decomposition,test_dump_load,test_eigfreq,test_simulation, andtest_mpbpass against an installed wheel, including with h5py loaded alongside (which puts two different HDF5 major versions in one process).Not verified: the
publishjob. It needs a real tag and a configured PyPI trusted publisher, so it cannot run before this merges.LLM Disclaimer
I used Claude Code (Opus 5) for assistance here.