Drop pybind11 from the runtime dependencies - #33
Merged
Merged
Conversation
pybind11 is needed only to compile the extension -- setup.py calls
pybind11.get_include() -- and it is already declared in
[build-system] requires. Nothing in the installed package imports it,
so every install has been pulling it in for nothing.
Noticed while writing a conda-forge recipe: conda separates build from
runtime requirements, so `pip check` in the built package reported
sbd-eigensolver 1.6.1 requires pybind11, which is not installed
against an environment that was correct.
Assisted-by: Claude Opus 5 (1M context)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pybind11is declared as a runtime dependency, but it is only needed to compile the extension:setup.pycallspybind11.get_include(), and it is already listed in[build-system] requires. Nothing in the installed package imports it — the only mentions inpython/*.pyare a comment and a docstring — so every install has been pulling it in for nothing.I noticed this while writing a conda-forge recipe. conda separates build-time from runtime requirements, so
pybind11went into the recipe'shostsection and notrun. The built package'spip checkthen failed against an environment that was actually correct:Verified with the patch applied:
pip showreportsRequires: mpi4py, numpy,pip checkreports no broken requirements, the CPU extension still compiles and imports, andpytestpasses (2 passed, 7 skipped — the slow and MPI cases opt out by default).mpi4pystays in both lists, correctly: it is needed at build time for its headers and at run time forMPI.This PR was generated by Claude Opus 5 under my guidance.