From d401423646b085519df98cca01a0ba4b120180e7 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 22 Feb 2026 23:19:08 +0000 Subject: [PATCH] EC-21: FEAT: Added commands to publish to pypi. Refers: Evercatch/evercatch-board#21 --- pyproject.toml | 61 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7cf7bfb..8f2cd4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,39 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" +# --------------------------------------------------------------------------- +# PEP 621 metadata — read by PyPI, pip, and other standard tools +# --------------------------------------------------------------------------- + +[project] +name = "evercatch" +version = "0.0.1" +authors = [ + { name = "Evercatch", email = "support@evercatch.dev" }, +] +description = "Official Python SDK for Evercatch webhook infrastructure platform." +readme = "README.md" +requires-python = ">=3.12" +keywords = ["evercatch", "sdk", "api", "webhooks"] +license = "MIT" +license-files = ["LICEN[CS]E*"] +classifiers = [ + "Development Status :: 1 - Planning", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://git.psmattas.com/evercatch/evercatch-python" +Issues = "https://git.psmattas.com/evercatch/evercatch-python/issues" + +# --------------------------------------------------------------------------- +# Poetry-specific settings (dependency management, packaging) +# --------------------------------------------------------------------------- + [tool.poetry] name = "evercatch" version = "0.0.1" @@ -11,17 +44,14 @@ license = "MIT" readme = "README.md" repository = "https://git.psmattas.com/evercatch/evercatch-python" keywords = ["evercatch", "sdk", "api", "webhooks"] - -# These classifiers are important for PyPI to categorize your package correctly classifiers = [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", ] - -# This tells Poetry that your package code is in the 'evercatch' folder packages = [{ include = "evercatch" }] [tool.poetry.dependencies] @@ -36,17 +66,24 @@ poethepoet = ">=0.24" # Usage: # poetry run poe build – build sdist + wheel into dist/ # poetry run poe publish-gitea – upload dist/* to the Gitea registry -# poetry run poe release – build then publish (one shot) +# poetry run poe publish-pypi – upload dist/* to PyPI +# poetry run poe release – build then publish to both (one shot) # -# Before running publish-gitea, make sure ~/.pypirc contains: +# ~/.pypirc must be configured with both registries: # # [distutils] -# index-servers = gitea +# index-servers = +# gitea +# pypi # # [gitea] # repository = https://git.psmattas.com/api/packages/Evercatch/pypi # username = -# password = +# password = +# +# [pypi] +# username = __token__ +# password = pypi- # --------------------------------------------------------------------------- [tool.poe.tasks.build] @@ -57,6 +94,10 @@ help = "Build sdist and wheel into dist/" cmd = "python -m twine upload --repository gitea dist/*" help = "Upload dist/* to the Gitea package registry" +[tool.poe.tasks.publish-pypi] +cmd = "python -m twine upload --repository pypi dist/*" +help = "Upload dist/* to PyPI" + [tool.poe.tasks.release] -sequence = [{ref = "build"}, {ref = "publish-gitea"}] -help = "Build and publish to Gitea in one step" +sequence = [{ ref = "build" }, { ref = "publish-gitea" }, { ref = "publish-pypi" }] +help = "Build and publish to Gitea and PyPI in one step"