From 972211747821a9384ed31193b529a8ff71e7ef83 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Fri, 13 Feb 2026 12:41:34 +0100 Subject: [PATCH 1/4] build: Update pyproject.toml to be more PEP 621 compliant --- poetry.lock | 6 +++--- pyproject.toml | 54 ++++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/poetry.lock b/poetry.lock index ccafe0a5c..947ceba7f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. [[package]] name = "bump2version" @@ -1050,5 +1050,5 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.1" -python-versions = "^3.11" -content-hash = "f58f04f170bd72f913d33992224112b9fc24a3bd06cd2dc2120e99d29e043955" +python-versions = ">=3.11" +content-hash = "d4834e154177290ee17b2c82c065ff8a39079065d02e18af40fe4bea4c629fb2" diff --git a/pyproject.toml b/pyproject.toml index 0f4eb6144..b37a408e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,39 +1,41 @@ -[tool.poetry] +[project] name = "zxbasic" version = "1.18.7" description = "Boriel's ZX BASIC Compiler" -authors = ["Jose Rodriguez "] +authors = [ + { name = "Jose Rodriguez", email = "zxbasic@boriel.com" } +] license = "AGPL-3.0-or-later" -documentation = "https://zxbasic.readthedocs.io" -repository = "https://github.com/boriel-basic/zxbasic" -homepage = "https://github.com/boriel-basic" readme = "README.md" - +requires-python = ">=3.11" +keywords = ["compiler", "zxspectrum", "BASIC", "z80"] classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', - 'License :: OSI Approved :: GNU Affero General Public License v3', - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - ] + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] -keywords = ['compiler', 'zxspectrum', 'BASIC', 'z80'] # arbitrary keywords +[project.urls] +Homepage = "https://github.com/boriel-basic" +Repository = "https://github.com/boriel-basic/zxbasic" +Documentation = "https://zxbasic.readthedocs.io" +[project.scripts] +zxbc = "src.zxbc:main" +zxbasm = "src.zxbasm:main" +zxbpp = "src.zxbpp:entry_point" + +# Poetry-specific packaging configuration that is not part of PEP 621. +# Keep this minimal section to preserve the current package discovery behavior. +[tool.poetry] packages = [ { include = "src/**/*" } ] -[tool.poetry.scripts] -zxbc = 'src.zxbc:main' -zxbasm = 'src.zxbasm:main' -zxbpp = 'src.zxbpp:entry_point' - -[tool.poetry.dependencies] -python = ">=3.11" - [tool.poetry.group.dev.dependencies] pytest = "*" bump2version = "^1.0.0" @@ -47,8 +49,8 @@ pytest-xdist = "*" setuptools = ">=70.1.1,<79.0.0" [build-system] -requires = ["poetry>=2.3.1"] -build-backend = "poetry.masonry.api" +requires = ["poetry-core>=2.0.0"] +build-backend = "poetry.core.masonry.api" [tool.poe.tasks] [[tool.poe.tasks.lint]] From 410f2975f1b9719cb888c707e994b257ae91c297 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Fri, 13 Feb 2026 12:54:10 +0100 Subject: [PATCH 2/4] build: Add clean task to Poe --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b37a408e8..7c7a95d4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,14 @@ shell = """ ruff format . """ +[[tool.poe.tasks.clean]] +help = "Clean up the project working tree (i.e. remove __pycache__ folders)" +shell = """ + find . -name "__pycache__" | xargs rm -rf + find . -name "*.pyc" -delete + rm -rf .mypy_cache .pytest_cache .ruff_cache dist/ .coverage.* + """ + [tool.coverage.run] branch = true omit = [ From ddbeb21edb1a52516de41e9306bbdc6d8554ba65 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Fri, 13 Feb 2026 13:54:03 +0100 Subject: [PATCH 3/4] build: Add LICENSE.txt file --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7c7a95d4f..6e8cc9baa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,9 @@ authors = [ { name = "Jose Rodriguez", email = "zxbasic@boriel.com" } ] license = "AGPL-3.0-or-later" +license-files = [ + "LICENSE.txt" +] readme = "README.md" requires-python = ">=3.11" keywords = ["compiler", "zxspectrum", "BASIC", "z80"] From 3f107f71cbb5375c31a915d1ec18112e6c59f35a Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Fri, 13 Feb 2026 13:58:09 +0100 Subject: [PATCH 4/4] refact: rename Workflow and update build tools --- .github/workflows/{python-app.yml => run-tests.yml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{python-app.yml => run-tests.yml} (93%) diff --git a/.github/workflows/python-app.yml b/.github/workflows/run-tests.yml similarity index 93% rename from .github/workflows/python-app.yml rename to .github/workflows/run-tests.yml index 44d531397..657fe4481 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/run-tests.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: ZXBasic +name: Run Test on: pull_request: @@ -29,8 +29,8 @@ jobs: - name: Install poetry run: | - pip install -U pip~=24.0 - pip install poetry~=1.7.1 + pip install -U pip~=26.0 + pip install poetry~=2.3.2 poetry config virtualenvs.in-project true - name: Set up poetry cache