From cddb3ee48b92ebc6246f007f70c07afea4397854 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:23:38 +1300 Subject: [PATCH 1/5] Set license and license-files key in project metadata to follow PEP639 Adhere to https://peps.python.org/pep-0639 and specify exact variant of license used (BSD-3-Clause). --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b4907e6dc64..dcd1b6d9b9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,8 @@ description = "A Python interface for the Generic Mapping Tools" readme = "README.md" requires-python = ">=3.11" authors = [{name = "The PyGMT Developers", email = "pygmt.team@gmail.com"}] +license = "BSD-3-Clause" +license-files = ["LICENSE.txt"] keywords = [ "cartography", "geodesy", @@ -27,7 +29,6 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", - "License :: OSI Approved :: BSD License", ] dependencies = [ "numpy>=1.25", From 9d0dead6ef3aea5667b9e7c57484a9a50e6d2f81 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:43:56 +1300 Subject: [PATCH 2/5] Use license = {text = "BSD-3-Clause"} to work with setuptools Also remove license-files, because it doesn't seem to be supported by setuptools yet. --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dcd1b6d9b9a..0b734e9e2c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,8 +8,7 @@ description = "A Python interface for the Generic Mapping Tools" readme = "README.md" requires-python = ">=3.11" authors = [{name = "The PyGMT Developers", email = "pygmt.team@gmail.com"}] -license = "BSD-3-Clause" -license-files = ["LICENSE.txt"] +license = {text = "BSD-3-Clause"} keywords = [ "cartography", "geodesy", From c20b234f7182037b0c8c1bb873053915ba644c3d Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:23:33 +1300 Subject: [PATCH 3/5] Revert "Use license = {text = "BSD-3-Clause"} to work with setuptools" This reverts commit 9d0dead6ef3aea5667b9e7c57484a9a50e6d2f81. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0b734e9e2c9..dcd1b6d9b9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,8 @@ description = "A Python interface for the Generic Mapping Tools" readme = "README.md" requires-python = ">=3.11" authors = [{name = "The PyGMT Developers", email = "pygmt.team@gmail.com"}] -license = {text = "BSD-3-Clause"} +license = "BSD-3-Clause" +license-files = ["LICENSE.txt"] keywords = [ "cartography", "geodesy", From 88784d055c1bca19f5c4a6de6c3efa4dad9e9783 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:56:05 +1200 Subject: [PATCH 4/5] Pin setuptools>=77 Initial support added for PEP 639, see https://setuptools.pypa.io/en/stable/history.html#v77-0-0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a2f93afea30..ea971a50e9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2"] +requires = ["setuptools>=77", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [project] From 2d30dccb00a5a7aab468987fa17edcce28b73f0e Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:57:17 +1200 Subject: [PATCH 5/5] Remove tool.setuptools.license-files Fixes `setuptools.errors.InvalidConfigError: 'project.license-files' is defined already. Remove 'tool.setuptools.license-files'` when running `make package`. --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ea971a50e9a..fc17957b49b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,9 +59,6 @@ all = [ "Changelog" = "https://www.pygmt.org/latest/changes.html" "Issue Tracker" = "https://github.com/GenericMappingTools/pygmt/issues" -[tool.setuptools] -license-files = ["LICENSE.txt"] - [tool.setuptools.packages.find] include = ["pygmt*"] exclude = ["doc"]