Repository navigation
Fix packaging missing subpackages - #156
Merged
Merged
Conversation
The 2.0 refactor moved the implementation into src/devices/ and
src/session/, but [tool.setuptools] packages still described the 1.x
flat layout, so setuptools never copied either directory into the
build. The published 2.0.0b1 wheel and sdist therefore contain only
api/, helper/, data/, hive.py and the flat deprecation shims — and
every one of those entry points imports from the two missing
subpackages:
apyhiveapi/__init__.py:29 from .hive import Hive
apyhiveapi/hive.py:8 from .devices.action import HiveAction
ModuleNotFoundError: No module named 'apyhiveapi.devices'
All three flavours (apyhiveapi, pyhive, pyhiveapi) fail at import, so
2.0.0b1 is unusable: it pip-installs cleanly and then breaks Home
Assistant at integration setup.
Add the four missing package names, and note in a comment why the list
is explicit rather than find: (package-dir maps two distribution names
onto one source tree) and why the sync flavour is absent from it (it is
generated by the unasync build_py cmdclass).
MANIFEST.in was stale for the same reason: it referenced a top-level
pyhiveapi/ and data/ that have not existed since the move to src/,
which is why SOURCES.txt listed no devices/ or session/ entries.
The test suite could not catch this — it runs against src/ via an
editable install and never touches the built artifact. Add
scripts/verify_dist.py, which installs the wheel into a throwaway venv
and imports every module in every flavour, and wire it into the tests
workflow and both publish workflows so a build like this cannot reach
PyPI again. Verified: it fails on the published 2.0.0b1 wheel and
passes on this build (132 modules, 3 flavours).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
verify_dist.py installs the built wheel, which resolves pyquery -> lxml. The packaging job runs on "3.x" (latest stable), which is exactly where a prebuilt lxml wheel may not yet exist, so install the same headers the tests job does rather than depending on wheel availability. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #156 +/- ##
=======================================
Coverage 99.96% 99.96%
=======================================
Files 30 30
Lines 2571 2571
Branches 297 297
=======================================
Hits 2570 2570
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Update all GitHub repository references from github.com/Pyhive/Pyhiveapi to github.com/Pyhass/Pyhive in pyproject.toml, README.md badges/links, and LICENSE link. Also skip Claude code review workflow for fork PRs since they lack secrets/OIDC tokens for authentication, and enhance the review prompt to use gh CLI commands and MCP inline comment tool for more targeted feedback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
No description provided.