Prepare metadata for PyPI publishing#3
Merged
Merged
Conversation
- __version__ is now derived from installed package metadata via importlib.metadata.version, replacing a hardcoded string that duplicated pyproject.toml. The smoke test asserts the two match to catch any future drift. - Operating System classifier widened from POSIX :: Linux to POSIX, matching the documented support range (Linux, macOS, WSL). - Added Changelog URL to [project.urls] so PyPI sidebar links it. - Added CHANGELOG.md (Keep a Changelog format, SemVer) with an initial 0.1.0a0 entry and Unreleased section. - Added CHANGELOG.md to the sdist include manifest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Xin Wang <wangxin.wang@gmail.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.
Summary
Pre-publish metadata cleanup so the first PyPI release uses correct, conventional metadata.
Changes
__version__now derived from installed package metadata viaimportlib.metadata.version("ansible-host"). Replaces a hardcoded__version__ = "0.1.0a0"that duplicatedpyproject.toml. Smoke test now asserts the two match, so any future drift is caught immediately.POSIX :: Linux→POSIX. README has always documented "Linux, macOS, WSL" — the narrower classifier was wrong.ChangelogURL added to[project.urls]so PyPI's sidebar links it.CHANGELOG.mdadded (Keep a Changelog format, SemVer), with an initial0.1.0a0entry covering the public API + anUnreleasedsection for this PR.CHANGELOG.mdadded to sdistincludeso source-installs see it too.Validation
twine check dist/*PASSED on both wheel and sdist