From 2609e8aa03b4fdf2cb182a2d23a7063c5d328a89 Mon Sep 17 00:00:00 2001 From: Hunter Allen Date: Mon, 14 Jul 2025 22:38:25 -0500 Subject: [PATCH 1/4] Update package metadata files to modern PEP 621 style --- pyproject.toml | 35 +++++++++++++++++++++++++++++++++++ setup.py | 28 ---------------------------- 2 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..89cdc94 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,35 @@ +[build-system] +requires = ["setuptools>=69", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "numpyencoder" +version = "0.3.2" +description = "Python JSON encoder for handling Numpy data types." +readme = { file = "README.md", content-type = "text/markdown" } + +requires-python = ">=3.6" +license = { text = "MIT" } + +authors = [ + { name = "Hunter M. Allen", email = "allenhm@gmail.com" }, +] + +keywords = ["numpy", "json", "encoder"] + +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +dependencies = [ + "numpy>=1.14.3", + "packaging>=20.0", +] + +[project.urls] +Homepage = "https://github.com/hmallen/numpyencoder" + +[tool.setuptools.packages.find] +include = ["numpyencoder*"] diff --git a/setup.py b/setup.py deleted file mode 100644 index bb064e3..0000000 --- a/setup.py +++ /dev/null @@ -1,28 +0,0 @@ -from setuptools import setup - -with open("README.md", "r", encoding="utf-8") as fh: - long_description = fh.read() - -setup( - name="numpyencoder", - version="0.3.2", - author="Hunter M. Allen", - author_email="allenhm@gmail.com", - license="MIT", - packages=["numpyencoder"], - install_requires=[ - "numpy>=1.14.3", - "packaging>=20.0", - ], - description="Python JSON encoder for handling Numpy data types.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/hmallen/numpyencoder", - keywords=["numpy", "json", "encoder"], - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - python_requires=">=3.6", -) From 192a4b50892a8d19e156bc4710c9149704ed7aa4 Mon Sep 17 00:00:00 2001 From: Hunter Allen Date: Mon, 14 Jul 2025 22:47:50 -0500 Subject: [PATCH 2/4] Replace deprecated license TOML table with SPDX-style string --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 89cdc94..d6b6f22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=69", "wheel"] +requires = ["setuptools>=77", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -9,7 +9,7 @@ description = "Python JSON encoder for handling Numpy data types." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.6" -license = { text = "MIT" } +license = "MIT" authors = [ { name = "Hunter M. Allen", email = "allenhm@gmail.com" }, @@ -19,7 +19,6 @@ keywords = ["numpy", "json", "encoder"] classifiers = [ "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] @@ -33,3 +32,6 @@ Homepage = "https://github.com/hmallen/numpyencoder" [tool.setuptools.packages.find] include = ["numpyencoder*"] + +[tool.setuptools] +license-files = ["LICENSE"] From 19c5b3466d6cac82d59e3a4a29426302d87de142 Mon Sep 17 00:00:00 2001 From: Hunter Allen Date: Mon, 14 Jul 2025 22:53:16 -0500 Subject: [PATCH 3/4] Move license-files to new namespace license-files moved out of tools.setuptools namespace in setuptools 77 --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d6b6f22..f7a1cfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.6" license = "MIT" +license-files = ["LICENSE"] authors = [ { name = "Hunter M. Allen", email = "allenhm@gmail.com" }, @@ -32,6 +33,3 @@ Homepage = "https://github.com/hmallen/numpyencoder" [tool.setuptools.packages.find] include = ["numpyencoder*"] - -[tool.setuptools] -license-files = ["LICENSE"] From 2ad3740f4899ce8a0499303e73cd7ef971ede8e2 Mon Sep 17 00:00:00 2001 From: Hunter Allen Date: Mon, 14 Jul 2025 23:08:18 -0500 Subject: [PATCH 4/4] Update workflow for setuptools 77 compatibility --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 226f8ea..32be06f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: | python -m pip install --upgrade pip