Skip to content

fix(packaging): ship linopy.remote and linopy.persistent in the wheel#865

Merged
FabianHofmann merged 1 commit into
masterfrom
fix/wheel-missing-subpackages
Jul 23, 2026
Merged

fix(packaging): ship linopy.remote and linopy.persistent in the wheel#865
FabianHofmann merged 1 commit into
masterfrom
fix/wheel-missing-subpackages

Conversation

@FBumann

@FBumann FBumann commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #864.

Note

The following content was generated by AI and verified locally.

[tool.setuptools.packages.find] include patterns are exact per level, so include = ["linopy"] matched only the top-level package and dropped linopy.remote and linopy.persistent from built wheels.

This is worse than latent: linopy/__init__.py does an unconditional from linopy.remote import RemoteHandler, so import linopy fails outright on a clean wheel install. It doesn't surface in development because editable/source installs expose the whole tree regardless.

Fix: add "linopy.*" so subpackages are discovered.

 [tool.setuptools.packages.find]
-include = ["linopy"]
+include = ["linopy", "linopy.*"]
Verification (uv build wheel contents)

Before (include = ["linopy"]):

find_packages(where=".", include=["linopy"]) -> ['linopy']

After, the built wheel ships both subpackages:

linopy/persistent/__init__.py
linopy/persistent/diff.py
linopy/persistent/errors.py
linopy/persistent/snapshot.py
linopy/remote/__init__.py
linopy/remote/oetc.py
linopy/remote/ssh.py

`[tool.setuptools.packages.find]` include patterns are exact per level, so
`include = ["linopy"]` matched only the top-level package and dropped the
`linopy.remote` and `linopy.persistent` subpackages from built wheels. Since
`linopy/__init__.py` imports `from linopy.remote import RemoteHandler`
unconditionally, `import linopy` fails outright on a clean wheel install.

Add `"linopy.*"` so subpackages are discovered.

Closes #864

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codspeed-hq

codspeed-hq Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 173 untouched benchmarks
⏩ 173 skipped benchmarks1


Comparing fix/wheel-missing-subpackages (b728f4d) with master (8853e38)

Open in CodSpeed

Footnotes

  1. 173 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@FabianHofmann
FabianHofmann merged commit e295723 into master Jul 23, 2026
23 checks passed
@FabianHofmann
FabianHofmann deleted the fix/wheel-missing-subpackages branch July 23, 2026 15:05
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.

Built wheels omit linopy.remote and linopy.persistent (packages.find include pattern)

2 participants