From 2b99334b3e160bb193d32f51bbcc567e01ec6430 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Tue, 27 May 2025 18:11:14 -0700 Subject: [PATCH 1/3] Update license metadata and copyright year New metadata fixes deprecation warnings from setuptools Packaging module required by setuptools for license metadata, older versions of cibuildwheel pinned an old version of it. --- .github/workflows/python-package.yml | 4 ++-- LICENSE.txt | 2 +- docs/conf.py | 2 +- pyproject.toml | 11 ++++++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b7337eb0..e20f2a30 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -235,7 +235,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install cibuildwheel==2.19.2 + pip install cibuildwheel==2.23.3 - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse @@ -290,7 +290,7 @@ jobs: # Downloads SDL2 for the later step. run: python build_sdl.py - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.23.3 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS_MACOS: x86_64 arm64 universal2 diff --git a/LICENSE.txt b/LICENSE.txt index d91bf759..ed980457 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2009-2023, Kyle Benesch and the python-tcod contributors. +Copyright (c) 2009-2025, Kyle Benesch and the python-tcod contributors. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/docs/conf.py b/docs/conf.py index 81c2d205..0fda406a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ # General information about the project. project = "python-tcod" -copyright = "2009-2023, Kyle Benesch" +copyright = "2009-2025, Kyle Benesch" author = "Kyle Benesch" # The version info for the project you're documenting, acts as replacement for diff --git a/pyproject.toml b/pyproject.toml index 37ca4d41..eac81af3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,9 @@ requires = [ # setuptools >=64.0.0 might break editable installs # https://github.com/pypa/setuptools/issues/3548 - "setuptools >=61.0.0", + "setuptools >=77.0.3", "setuptools_scm[toml]>=6.2", + "packaging>=24.2", "wheel>=0.37.1", "cffi>=1.15", "pycparser>=2.14", @@ -19,7 +20,12 @@ description = "The official Python port of libtcod." authors = [{ name = "Kyle Benesch", email = "4b796c65+tcod@gmail.com" }] readme = "README.rst" requires-python = ">=3.10" -license = { text = "Simplified BSD License" } +license = "BSD-2-Clause" +license-files = [ + "LICENSE.txt", + "libtcod/LICENSE.txt", + "libtcod/LIBTCOD-CREDITS.txt", +] dependencies = [ "cffi>=1.15", 'numpy>=1.21.4; implementation_name != "pypy"', @@ -39,7 +45,6 @@ classifiers = [ "Environment :: MacOS X", "Environment :: X11 Applications", "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: POSIX", "Operating System :: MacOS :: MacOS X", From 414a2dd0df5c8e461087ac0e6d4b183042bd92c6 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sat, 31 May 2025 14:11:09 -0700 Subject: [PATCH 2/3] Use arm64 runner for arm64 wheels Should improve performance of the vitalized build step --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e20f2a30..c025e115 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -211,7 +211,7 @@ jobs: linux-wheels: needs: [ruff, mypy] - runs-on: "ubuntu-latest" + runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest'}} strategy: matrix: arch: ["x86_64", "aarch64"] From 8c25d37bd7b278466703227dfe71ef9938b0b28c Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sat, 31 May 2025 14:17:07 -0700 Subject: [PATCH 3/3] Removed unused Mypy ignores Changed with Mypy update --- tcod/path.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcod/path.py b/tcod/path.py index 1668487a..92980b85 100644 --- a/tcod/path.py +++ b/tcod/path.py @@ -183,11 +183,11 @@ def __init__(self, cost: tcod.map.Map | ArrayLike | _EdgeCostFunc, diagonal: flo self._callback, self._userdata, self.shape, - ) = self.cost.get_tcod_path_ffi() # type: ignore[union-attr] + ) = self.cost.get_tcod_path_ffi() self._path_c = ffi.gc( self._path_new_using_function( - self.cost.shape[0], # type: ignore[union-attr] - self.cost.shape[1], # type: ignore[union-attr] + self.cost.shape[0], + self.cost.shape[1], self._callback, self._userdata, diagonal,