Skip to content

Package the proxy for PyPI and add a publishing workflow - #3

Open
lazyfp wants to merge 1 commit into
release-1.1.0from
packaging-pypi
Open

lazyfp wants to merge 1 commit into
release-1.1.0from
packaging-pypi

Conversation

@lazyfp

@lazyfp lazyfp commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Sets argyle up to publish to PyPI the same way tcpsweep does: pyproject.toml + a tag-triggered release.yml using Trusted Publishing, gated on the full suite. Targets release-1.1.0 so the packaging ships with 1.1.0 (a PyPI publish needs pyproject.toml on the tagged commit).

What's here

  • pyproject.toml (hatchling, version read from proxy.py's __version__).
  • tests.yml: +workflow_call (so release.yml can reuse it as the gate) and its push trigger narrowed to branches, so a v* tag runs the suite once (via the release gate) instead of twice. The existing release-version job still enforces tag == --version, through that reuse.
  • release.yml: on a v* tag → run the suite → build sdist+wheel → twine check → publish via OIDC. Actions pinned to commit SHAs (it holds publish rights); tests.yml keeps its @v7 tag pins.

The name

argyle and proxy.py are both taken on PyPI, so the distribution is argyll — the Scottish namesake of the argyle sock pattern. The installed command stays argyle. The source file keeps its name proxy.py but is shipped as the module argyll (not proxy) so installing it can't shadow that common top-level name.

Verified locally

  • python -m build → argyll-1.1.0 sdist + wheel; twine check passes both.
  • Wheel ships only argyll.py (confirmed via RECORD); import proxy fails in a clean venv — no shadowing.
  • pip install → argyle --version runs; import argyll works.
  • make check passes; both workflows parse.

Still needed before a publish (owner-only, on PyPI)

Configure a pending publisher at https://pypi.org/manage/account/publishing/ for project argyll:

  • Owner BearlyStable, repo argyle, workflow release.yml, environment pypi.

Until then the publish job has nothing to authenticate to. After it's set, merging this and pushing the v1.1.0 tag publishes argyll 1.1.0.

Note: --version still prints proxy.py 1.1.0; packaging doesn't change that. Say if you want the command/version string aligned to argyle.

🤖 Generated with Claude Code

https://claude.ai/code/session_018BQF9WQNaTBCJ6YB38RBU7

Add pyproject.toml (hatchling) so the proxy can be installed from PyPI, and a
release.yml that publishes on a v* tag via Trusted Publishing, gated on the
full test suite.

The distribution is "argyll": "argyle" and "proxy.py" are both taken on PyPI,
and Argyll is the Scottish namesake of the argyle sock pattern the project
puns on. The installed command is "argyle". The single source file is shipped
as the module "argyll" (hatchling force-include), not "proxy", so installing
it cannot shadow that common top-level name; the source file stays proxy.py.

tests.yml gains a workflow_call trigger so release.yml can reuse it as the
publish gate, and its push trigger is narrowed to branches so a tag no longer
runs it twice. The tag-vs-version check already in tests.yml's release-version
job still runs, via that reuse. release.yml pins its actions to commit SHAs,
as the workflow that holds publish rights; tests.yml keeps its tag pins.

Publishing also needs a pending publisher configured on PyPI (repo, release.yml,
environment "pypi"); until then the publish job has nothing to authenticate to.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018BQF9WQNaTBCJ6YB38RBU7
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.

1 participant