chore: prepare package for PyPI publication as "useprimer"#222
Merged
Conversation
The PyPI name "primer" is already taken by a prime-numbers library, so the PyPI project becomes "useprimer" — matching the domain exactly. The Python module stays `primer` (same pattern as PyYAML → `yaml`), so imports and the `primer` CLI entry point are unchanged. pyproject.toml: - Rename [project] name → "useprimer" - Add readme, license, authors, maintainers, keywords, classifiers - Add [project.urls] for Homepage, Documentation, Repository, Issues, Changelog, and Live Demo — these surface as inbound links on the PyPI project page (SEO signal from a high-trust domain, which should help accelerate Google indexing of useprimer.dev) - Add [tool.hatch.build.targets.wheel] packages so hatch picks up src/primer/ under the new project name - Add [tool.hatch.build.targets.sdist] include list README.md: - Update install command from `pip install primer` to `pip install useprimer` with a note that the Python module is still `primer` PUBLISHING.md: - New doc covering token setup, TestPyPI rehearsal, full release workflow, and tag/push steps Verified: `python -m build` produces useprimer-0.2.0-py3-none-any.whl with all Project-URL entries intact; `import primer` still works from the built wheel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tion Click's version_option uses importlib.metadata to look up the installed distribution. The Python module is still `primer` but the PyPI package is now `useprimer`, so click was raising: RuntimeError: 'primer' is not installed. Try passing 'package_name' instead. Update the explicit package_name so --version resolves against the correct distribution. Fixes the test_version CI failure. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
The PyPI name
primeris already taken by a 2015 prime-numbers library, so this PR preps the package to publish asuseprimer— matching the domain. The Python module staysprimer(same pattern asPyYAML→yaml), soimport primerand theprimerCLI entry point are unchanged.Once published, the PyPI project page surfaces the six
[project.urls]entries as inbound links from pypi.org — a very high-trust domain. That's the SEO signal we need to help accelerate Google indexing of useprimer.dev (on top of the developer-distribution benefit).pyproject.toml
[project] name→"useprimer"readme,license,authors,maintainers,keywords,classifiers[project.urls]→ Homepage, Documentation, Repository, Issues, Changelog, Live Demo[tool.hatch.build.targets.wheel] packages = ["src/primer"]so hatch finds the module under the new project name[tool.hatch.build.targets.sdist] include = [...]for a proper sdistREADME.md
pip install primer→pip install useprimer(with note that the Python module is stillprimer)PUBLISHING.md (new)
Test plan
python -m buildproducesuseprimer-0.2.0-py3-none-any.whlprimer/module +primer/_alembic/migrationspython -c "import primer; print(primer.__name__)"→primerpytest tests/test_hook_installer.py tests/test_hook_session_end.py→ 43 passedFollow-up (not in this PR)
Actually publishing requires a PyPI account + API token (documented in PUBLISHING.md). The first upload from a clean account will also need to go through TestPyPI first to verify the rendered project page looks right before committing the public name.
🤖 Generated with Claude Code
Note
Low Risk
Mostly packaging/metadata changes for PyPI plus docs; runtime behavior should be unchanged, with the main risk being a misconfigured build that omits modules/migrations or breaks version reporting.
Overview
Prepares the project for PyPI publication under the new distribution name
useprimerwhile keeping the import/CLI nameprimer.Updates
pyproject.tomlwith the new project name, richer package metadata andproject.urls, and Hatch build config to explicitly includesrc/primerplus sdist contents. The CLI’s--versionlookup is switched topackage_name="useprimer", and the README/install docs are updated accordingly, with a newPUBLISHING.mddocumenting the release workflow.Reviewed by Cursor Bugbot for commit 9ce8da9. Bugbot is set up for automated code reviews on this repo. Configure here.