Skip to content

Build PyPI wheels in CI - #3312

Open
yorickreum wants to merge 2 commits into
NanoComp:masterfrom
yorickreum:pypi-wheels
Open

yorickreum wants to merge 2 commits into
NanoComp:masterfrom
yorickreum:pypi-wheels

Conversation

@yorickreum

@yorickreum yorickreum commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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 meep via pip 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 stays meep.

meep on 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, and test_mpb pass against an installed wheel, including with h5py loaded alongside (which puts two different HDF5 major versions in one process).

Not verified: the publish job. 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.

@yorickreum
yorickreum force-pushed the pypi-wheels branch 2 times, most recently from d7f3dd1 to 30063ba Compare September 14, 2026 19:46

@oskooi oskooi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks for putting together this (long-awaited) package.

@stevengj

Copy link
Copy Markdown
Collaborator

In order for this to work, do we need to register a pymeep account on PyPI?

Comment thread python/Makefile.am Outdated
Comment thread python/Makefile.am
Comment thread doc/docs/Installation.md Outdated
@stevengj

stevengj commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

cc @haard, who maintains a meep package on PyPi that seems to be defunct? (Its homepage link is broken.)

@haard, if your meep package is defunct would it be possible to take over that name for this package (which has been around since 2006)? No pressure. It looks like the existing meep package continues to be downloaded, in which case we should stick with pymeep for our package, which has the advantage of matching the Conda name.

@haard

haard commented Sep 17, 2026

Copy link
Copy Markdown

I'd be happy to, not sure about the protocol though
I can delete the package from pypi, if you are ready to register a new one? Alternatively, I can add you and transfer ownership, it looks like. One issue is that you'd need to set a 2.x version to not collide with already-published releases.

@yorickreum

yorickreum commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

I'd be happy to, not sure about the protocol though I can delete the package from pypi, if you are ready to register a new one? Alternatively, I can add you and transfer ownership, it looks like. One issue is that you'd need to set a 2.x version to not collide with already-published releases.

Cool! meep is slightly cleaner than pymeep of course ... the current GitHub release v1.34.0 already has a higher minor version number than your v1.0.6 on PyPi. Would this be enough or would it really need to be a new major version number?

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.
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.
@yorickreum

Copy link
Copy Markdown
Contributor Author

I've changed the package name to meep in the CI. If @haard could add @NanoComp as an owner of the PyPI project, this should work cleanly for v1.35.0.

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.

4 participants