From 003c5f90e3d2d195187f55750aee7ebe489630da Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Wed, 4 Mar 2026 14:21:10 -0800 Subject: [PATCH 1/2] move away from setup.py to pyproject.toml --- .github/workflows/pre-commit.yml | 4 +-- pyproject.toml | 47 ++++++++++++++++++++++++++- setup.py | 56 -------------------------------- 3 files changed, 48 insertions(+), 59 deletions(-) delete mode 100644 setup.py diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 8cab09d..5e35224 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -24,12 +24,12 @@ jobs: matrix: linux runs-on: intel: ubuntu-latest - arm: [linux, arm64] + arm: ubuntu-24.04-arm - name: macOS matrix: macos runs-on: intel: macos-15-intel - arm: macos-13-arm64 + arm: macos-15 - name: Windows matrix: windows runs-on: diff --git a/pyproject.toml b/pyproject.toml index 3f80b80..4553f18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,51 @@ [build-system] requires = [ "setuptools>=80", - "setuptools_scm[toml]>=8", + "setuptools_scm>=8", ] build-backend = "setuptools.build_meta" + +[project] +name = "CAT_admin_tool" +description = "Tools to administer issuance and redemption of a Chia Asset Token or CAT" +readme = "README.md" +license = { text = "Apache-2.0" } +authors = [ + { name = "CNI", email = "hello@chia.net" }, +] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: Apache Software License", + "Topic :: Security :: Cryptography", +] +dependencies = [ + "chia-blockchain==2.6.0", +] +optional-dependencies = { dev = [ + "pytest", + "pytest-asyncio>=0.26.0", + "pytest-env", + "pre-commit==4.5.1; python_version >= '3.10'", + "mypy==1.19.1", + "types-setuptools", + "ruff==0.15.2", +] } +dynamic = ["version"] + +[project.urls] +"Bug Reports" = "https://github.com/Chia-Network/cat-admin-tool" +"Source" = "https://github.com/Chia-Network/cat-admin-tool" +"Homepage" = "https://github.com/Chia-Network" + +[project.scripts] +cats = "cats.cats:main" +secure_the_bag = "cats.secure_the_bag:main" +unwind_the_bag = "cats.unwind_the_bag:main" + +[tool.setuptools.packages.find] +exclude = ["tests"] + +[tool.setuptools_scm] diff --git a/setup.py b/setup.py deleted file mode 100644 index b429517..0000000 --- a/setup.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python - -from __future__ import annotations - -from setuptools import find_packages, setup - -with open("README.md") as fh: - long_description = fh.read() - -dependencies = [ - "chia-blockchain==2.6.0", -] - -dev_dependencies = [ - "pytest", - "pytest-asyncio>=0.26.0", - "pytest-env", - "pre-commit==4.5.1; python_version >= '3.10'", - "mypy==1.19.1", - "types-setuptools", - "ruff==0.15.2", -] - -setup( - name="CAT_admin_tool", - author="Quexington", - packages=find_packages(exclude=("tests",)), - entry_points={ - "console_scripts": [ - "cats = cats.cats:main", - "secure_the_bag = cats.secure_the_bag:main", - "unwind_the_bag = cats.unwind_the_bag:main", - ], - }, - author_email="m.hauff@chia.net", - setup_requires=["setuptools_scm"], - install_requires=dependencies, - url="https://github.com/Chia-Network", - license="Apache-2.0", - description="Tools to administer issuance and redemption of a Chia Asset Token or CAT", - classifiers=[ - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: Apache Software License", - "Topic :: Security :: Cryptography", - ], - extras_require=dict( - dev=dev_dependencies, - ), - project_urls={ - "Bug Reports": "https://github.com/Chia-Network/cat-admin-tool", - "Source": "https://github.com/Chia-Network/cat-admin-tool", - }, -) From 08a1e050b7cd3bdc3a514f88a46047937d4d7237 Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Wed, 4 Mar 2026 14:29:47 -0800 Subject: [PATCH 2/2] update mypy --- mypy.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mypy.ini b/mypy.ini index 1e9a78a..fa0d712 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,5 @@ [mypy] -files = cats,tests,*.py +files = cats,tests show_error_codes = True warn_unused_ignores = True @@ -15,4 +15,3 @@ warn_return_any = True no_implicit_reexport = True strict_equality = True warn_redundant_casts = True -enable_incomplete_feature = Unpack