packaging: ship to PyPI via tag + GitLab CI (mirrors ago's pattern)

pyproject.toml gains the metadata PyPI expects:
  - Real author name + email
  - Keywords (erlang, elixir, distribution, gen_server, ...)
  - Classifiers (status, license, Python versions, topic)
  - Project URLs (Homepage / Repository / Bug Tracker)
  - readme content-type = text/markdown so PyPI renders our README
  - build + twine added to the [dev] extra

.gitlab-ci.yml mirrors ago's two-stage pattern:
  - test stage on every push (venv + pip install -e .[dev] + pytest)
  - pypi-twine stage only on tags: python -m build, twine check,
    twine upload. Credentials come from GitLab CI variables
    TWINE_USERNAME (typically __token__) and TWINE_PASSWORD.

Makefile gains build / dist-check / publish-test / publish targets so
the release flow is also runnable locally if a dry run is needed.

Release flow:
  1. Bump version in pyproject.toml
  2. Commit + push
  3. git tag -a vX.Y.Z -m 'release vX.Y.Z' && git push --tags
  4. CI's pypi-twine stage picks up the tag and uploads

README.md adds an Install section + Quick start (plain dist + TLS dist)
so PyPI's project page shows usable copy on first visit. dist/ artifacts
build cleanly and both pass twine check.
This commit is contained in:
russell@unturf.com 2026-06-16 13:45:08 -04:00
parent c870bdb2ac
commit 001a471549
No known key found for this signature in database
4 changed files with 171 additions and 18 deletions

View file

@ -5,20 +5,55 @@ build-backend = "setuptools.build_meta"
[project]
name = "erldistpy"
version = "0.0.1"
description = "Native Python client for Erlang distribution protocol"
readme = "README.md"
description = "Native Python client for Erlang distribution protocol — EPMD + v6 handshake + gen_server call(), no asyncio."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.10"
license = { text = "Unlicense" }
authors = [
{ name = "fox", email = "russell@unturf.com" },
{ name = "Russell Ballestrini", email = "russell.ballestrini@gmail.com" },
]
keywords = [
"erlang",
"elixir",
"distribution",
"dist",
"gen_server",
"rpc",
"etf",
"epmd",
"inet_tls_dist",
"interop",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: Public Domain",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Erlang",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Networking",
]
dependencies = []
[project.urls]
Homepage = "https://git.unturf.com/python/erldistpy"
Repository = "https://git.unturf.com/python/erldistpy"
"Bug Tracker" = "https://git.unturf.com/python/erldistpy/-/issues"
[project.optional-dependencies]
dev = [
"pytest >=8.0,<9",
"pytest-cov >=5.0,<7",
"ruff >=0.6,<1",
"build >=1.0",
"twine >=5.0",
]
[tool.setuptools.packages.find]