From 33b35db1d254b002874760f364c7e33efcc15848 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Mon, 20 Jan 2025 13:09:10 +0100 Subject: [PATCH] Update pyproject.toml with Poetry v2.0 (#499) Migrate from [tool.poetry] to [project] https://python-poetry.org/blog/announcing-poetry-2.0.0 https://python-poetry.org/docs/pyproject/ https://python-poetry.org/docs/faq/#migrate-pep621-new-static Update website, changelog urls (#433) Use dynamic Poetry classifiers and dependencies, more convenient but less generic to pyproject.toml project Change classifier to "Operating System :: Unix", since Silkaj is not supported on Windows Move pydiscourse to optional-dependencies, since Poetry extra is deprecated Set main authors, with full names, sorted by importance of their contributions Switch back pip container build to install Poetry v2 --- AUTHORS.md | 2 +- image/pip | 2 +- pyproject.toml | 59 +++++++++++++++++++++++++++++--------------------- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 2f4a274c..aedf4344 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,9 +1,9 @@ # Authors and contributors - Moul, Maël Azimi <ma.azimi@moul.re> +- Matograine <tom.ngr@zaclys.net> - Tortue <ucoin@tednet.fr> - cebash, Sébastien DA ROCHA <sebastien@da-rocha.net> -- Matograine <tom.ngr@zaclys.net> - atrax, <duniter@karam.email> - cgeek, Cédric Moreau <cem.moreau@gmail.com> - jytou, Jean-Yves Toumit <jytoumit@gmail.com> diff --git a/image/pip b/image/pip index d46232de..5c1dfd00 100644 --- a/image/pip +++ b/image/pip @@ -5,7 +5,7 @@ ARG PYTHON_VERS FROM python:${PYTHON_VERS}-slim AS build # Install Poetry -RUN pip install "poetry>=1.8,<2.0" +RUN pip install poetry WORKDIR /silkaj diff --git a/pyproject.toml b/pyproject.toml index 60e4edd6..42725166 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,48 @@ -[tool.poetry] +[project] name = "silkaj" version = "0.11.0" description = "Command line client for Ğ1 libre-currency powered by Duniter" -authors = ["Moul <moul@moul.re>"] -maintainers = ["Moul <moul@moul.re>"] +license = { text = "AGPL-3.0-or-later" } readme = "README.md" -license = "AGPL-3.0-or-later" +requires-python = ">=3.9,<4.0" +authors = [ + { name = "Moul, Maël Azimi", email = "mael.azimi@moul.re"}, + { name = "Matograine", email = "tom.ngr@zaclys.net"}, + { name = "Tortue", email = "ucoin@tednet.fr"}, + { name = "cebash, Sébastien DA ROCHA", email = "sebastien@da-rocha.net"}, +] +maintainers = [{ name = "Moul, Maël Azimi", email = "mael.azimi@moul.re"}] +keywords = ["g1", "duniter", "cryptocurrency", "librecurrency", "RTM"] +dynamic = ["classifiers", "dependencies"] + +[project.urls] homepage = "https://silkaj.duniter.org" repository = "https://git.duniter.org/clients/python/silkaj" -documentation = "https://git.duniter.org/clients/python/silkaj/tree/main/doc" -urls = { Changelog = "https://git.duniter.org/clients/python/silkaj/-/blob/main/CHANGELOG.md" } -keywords = ["g1", "duniter", "cryptocurrency", "librecurrency", "RTM"] -include = ["g1_monetary_license/g1_monetary_license_*.rst"] +documentation = "https://silkaj.duniter.org/latest/" +"changelog" = "https://silkaj.duniter.org/latest/changelog/" + +[project.scripts] +silkaj = "silkaj.cli:cli" + +[tool.poetry] +requires-poetry = ">=2.0" +include = [{path="g1_monetary_license/g1_monetary_license_*.rst", format=["sdist", "wheel"]}] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Operating System :: Unix", + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "Natural Language :: English", +] + +[project.optional-dependencies] +deathreaper = [ "pydiscourse (>=1.7.0,<2.0)" ] [tool.poetry.dependencies] -python = "^3.9.0" duniterpy = "~1.2.0" rich-click = "^1.8.3" texttable = "^1.7.0" arrow = "^1.3.0" -pydiscourse = { version = "^1.7.0", optional = true } [tool.poetry.group.test.dependencies] pytest = "^8.1.1" @@ -27,9 +50,6 @@ pytest-cov = "^6.0" pytest-sugar = "^1.0.0" pytest-clarity = "^1.0.1" -[tool.poetry.extras] -deathreaper = ["pydiscourse"] - [tool.poetry.group.docs] optional = true @@ -39,21 +59,10 @@ mike = "^2.1.3" mkdocs-coverage = "^1.1.0" mkdocs-gitlab-plugin = "^0.1.4" -[tool.poetry.scripts] -silkaj = "silkaj.cli:cli" - [build-system] -requires = ["poetry-core>=1.0.0"] +requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Operating System :: OS Independent", - "Environment :: Console", - "Intended Audience :: End Users/Desktop", - "Natural Language :: English" -] - [tool.mypy] ignore_missing_imports = true -- GitLab